_respect_kdm_validity_periods = true;
_player_log_file = boost::none;
_player_content_directory = boost::none;
+ _player_playlist_directory = boost::none;
_player_kdm_directory = boost::none;
#ifdef DCPOMATIC_VARIANT_SWAROOP
_player_background_image = boost::none;
_respect_kdm_validity_periods = f.optional_bool_child("RespectKDMValidityPeriods").get_value_or(true);
_player_log_file = f.optional_string_child("PlayerLogFile");
_player_content_directory = f.optional_string_child("PlayerContentDirectory");
+ _player_playlist_directory = f.optional_string_child("PlayerPlaylistDirectory");
_player_kdm_directory = f.optional_string_child("PlayerKDMDirectory");
#ifdef DCPOMATIC_VARIANT_SWAROOP
_player_background_image = f.optional_string_child("PlayerBackgroundImage");
if (_player_content_directory) {
root->add_child("PlayerContentDirectory")->add_child_text(_player_content_directory->string());
}
+ if (_player_playlist_directory) {
+ root->add_child("PlayerPlaylistDirectory")->add_child_text(_player_playlist_directory->string());
+ }
if (_player_kdm_directory) {
root->add_child("PlayerKDMDirectory")->add_child_text(_player_kdm_directory->string());
}
return _player_content_directory;
}
+ boost::optional<boost::filesystem::path> player_playlist_directory () const {
+ return _player_playlist_directory;
+ }
+
boost::optional<boost::filesystem::path> player_kdm_directory () const {
return _player_kdm_directory;
}
changed (PLAYER_CONTENT_DIRECTORY);
}
+ void set_player_playlist_directory (boost::filesystem::path p) {
+ maybe_set (_player_playlist_directory, p);
+ }
+
+ void unset_player_playlist_directory () {
+ if (!_player_playlist_directory) {
+ return;
+ }
+ _player_playlist_directory = boost::none;
+ changed ();
+ }
+
void set_player_kdm_directory (boost::filesystem::path p) {
maybe_set (_player_kdm_directory, p);
}
for playback.
*/
boost::optional<boost::filesystem::path> _player_content_directory;
+ boost::optional<boost::filesystem::path> _player_playlist_directory;
boost::optional<boost::filesystem::path> _player_kdm_directory;
#ifdef DCPOMATIC_VARIANT_SWAROOP
boost::optional<boost::filesystem::path> _player_background_image;
_v_sizer->Add (view_options, 0, wxALL, DCPOMATIC_SIZER_GAP);
- wxBoxSizer* e_sizer = new wxBoxSizer (wxHORIZONTAL);
+ wxBoxSizer* left_sizer = new wxBoxSizer (wxVERTICAL);
_content_view = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER);
/* time */
_content_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 80);
/* annotation text */
_content_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 580);
- e_sizer->Add (_content_view, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
+ left_sizer->Add (_content_view, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
_spl_view = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER);
- _spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 80);
- _spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 80);
- _spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 580);
- e_sizer->Add (_spl_view, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
+ _spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 740);
+ left_sizer->Add (_spl_view, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
+
+ wxBoxSizer* e_sizer = new wxBoxSizer (wxHORIZONTAL);
+ e_sizer->Add (left_sizer, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
+
+ _current_spl_view = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER);
+ _current_spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 80);
+ _current_spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 80);
+ _current_spl_view->AppendColumn (wxT(""), wxLIST_FORMAT_LEFT, 580);
+ e_sizer->Add (_current_spl_view, 1, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
wxBoxSizer* buttons_sizer = new wxBoxSizer (wxVERTICAL);
_add_button = new wxButton(this, wxID_ANY, _("Add"));
_content_view->Show (false);
_spl_view->Show (false);
+ _current_spl_view->Show (false);
_add_button->Show (false);
_save_button->Show (false);
_load_button->Show (false);
/* Put 1 frame of black at the start so when we seek to 0 we don't see anything */
sel->set_position (DCPTime::from_frames(1, _film->video_frame_rate()));
}
- add_content_to_list (sel, _spl_view);
+ add_content_to_list (sel, _current_spl_view);
setup_sensitivity ();
}
if (d->ShowModal() == wxID_OK) {
_film->read_metadata (boost::filesystem::path(wx_to_std(d->GetPath())));
- _spl_view->DeleteAllItems ();
+ _current_spl_view->DeleteAllItems ();
BOOST_FOREACH (shared_ptr<Content> i, _film->content()) {
shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(i);
- add_content_to_list (dcp, _spl_view);
+ add_content_to_list (dcp, _current_spl_view);
}
}
update_content_directory ();
}
_spl_view->Show (s);
+ _current_spl_view->Show (s);
_log->Show (s);
_add_button->Show (s);
_save_button->Show (s);
wxCheckBox* _jump_to_selected;
wxListCtrl* _content_view;
wxListCtrl* _spl_view;
+ wxListCtrl* _current_spl_view;
wxTextCtrl* _log;
wxButton* _add_button;
wxButton* _save_button;
table->Add (_content_directory, wxGBPosition (r, 1));
++r;
+ add_label_to_sizer (table, _panel, _("Playlist directory"), true, wxGBPosition (r, 0));
+ _playlist_directory = new wxDirPickerCtrl (_panel, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
+ table->Add (_playlist_directory, wxGBPosition (r, 1));
+ ++r;
+
add_label_to_sizer (table, _panel, _("KDM directory"), true, wxGBPosition (r, 0));
_kdm_directory = new wxDirPickerCtrl (_panel, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
table->Add (_kdm_directory, wxGBPosition (r, 1));
#endif
_content_directory->Bind (wxEVT_DIRPICKER_CHANGED, bind(&LocationsPage::content_directory_changed, this));
+ _playlist_directory->Bind (wxEVT_DIRPICKER_CHANGED, bind(&LocationsPage::playlist_directory_changed, this));
_kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, bind(&LocationsPage::kdm_directory_changed, this));
#ifdef DCPOMATIC_VARIANT_SWAROOP
_background_image->Bind (wxEVT_FILEPICKER_CHANGED, bind(&LocationsPage::background_image_changed, this));
if (config->player_content_directory()) {
checked_set (_content_directory, *config->player_content_directory());
}
+ if (config->player_playlist_directory()) {
+ checked_set (_playlist_directory, *config->player_playlist_directory());
+ }
if (config->player_kdm_directory()) {
checked_set (_kdm_directory, *config->player_kdm_directory());
}
Config::instance()->set_player_content_directory(wx_to_std(_content_directory->GetPath()));
}
+ void playlist_directory_changed ()
+ {
+ Config::instance()->set_player_playlist_directory(wx_to_std(_playlist_directory->GetPath()));
+ }
+
void kdm_directory_changed ()
{
Config::instance()->set_player_kdm_directory(wx_to_std(_kdm_directory->GetPath()));
#endif
wxDirPickerCtrl* _content_directory;
+ wxDirPickerCtrl* _playlist_directory;
wxDirPickerCtrl* _kdm_directory;
#ifdef DCPOMATIC_VARIANT_SWAROOP
FilePickerCtrl* _background_image;