X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fplayer_config_dialog.cc;h=a34f0bd3b4a897a78c544051a5a75391c33653dd;hb=8414829693900c3d6362a4f15d677bb7e1462c3e;hp=dda2b62e5d63c4e6e7f67b15a780f96aed4ffc57;hpb=ab8ef6d729e6a858c8719e463011813f82c9a6ea;p=dcpomatic.git diff --git a/src/wx/player_config_dialog.cc b/src/wx/player_config_dialog.cc index dda2b62e5..a34f0bd3b 100644 --- a/src/wx/player_config_dialog.cc +++ b/src/wx/player_config_dialog.cc @@ -115,11 +115,17 @@ private: table->Add (_dcp_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)); + ++r; + _player_mode->Bind (wxEVT_CHOICE, bind(&PlayerGeneralPage::player_mode_changed, this)); _image_display->Bind (wxEVT_CHOICE, bind(&PlayerGeneralPage::image_display_changed, this)); _respect_kdm->Bind (wxEVT_CHECKBOX, bind(&PlayerGeneralPage::respect_kdm_changed, this)); _log_file->Bind (wxEVT_FILEPICKER_CHANGED, bind(&PlayerGeneralPage::log_file_changed, this)); _dcp_directory->Bind (wxEVT_DIRPICKER_CHANGED, bind(&PlayerGeneralPage::dcp_directory_changed, this)); + _kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, bind(&PlayerGeneralPage::kdm_directory_changed, this)); } void config_changed () @@ -148,6 +154,9 @@ private: if (config->player_dcp_directory()) { checked_set (_dcp_directory, *config->player_dcp_directory()); } + if (config->player_kdm_directory()) { + checked_set (_kdm_directory, *config->player_kdm_directory()); + } } private: @@ -186,11 +195,17 @@ private: Config::instance()->set_player_dcp_directory(wx_to_std(_dcp_directory->GetPath())); } + void kdm_directory_changed () + { + Config::instance()->set_player_kdm_directory(wx_to_std(_kdm_directory->GetPath())); + } + wxChoice* _player_mode; wxChoice* _image_display; wxCheckBox* _respect_kdm; FilePickerCtrl* _log_file; wxDirPickerCtrl* _dcp_directory; + wxDirPickerCtrl* _kdm_directory; }; wxPreferencesEditor*