diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-24 21:46:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-24 21:46:50 +0100 |
| commit | ab8ef6d729e6a858c8719e463011813f82c9a6ea (patch) | |
| tree | 337a4f3181754825aa0652b65de3a9e39f04d814 /src/wx/player_config_dialog.cc | |
| parent | e571e208d540a5bb6dafa49a8e91cb0428931abb (diff) | |
Fix up DCP list in player.
Diffstat (limited to 'src/wx/player_config_dialog.cc')
| -rw-r--r-- | src/wx/player_config_dialog.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/wx/player_config_dialog.cc b/src/wx/player_config_dialog.cc index 84657f99b..dda2b62e5 100644 --- a/src/wx/player_config_dialog.cc +++ b/src/wx/player_config_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -26,8 +26,8 @@ #include "wx_util.h" #include "editable_list.h" #include "filter_dialog.h" -#include "dir_picker_ctrl.h" #include "file_picker_ctrl.h" +#include "dir_picker_ctrl.h" #include "isdcf_metadata_dialog.h" #include "server_dialog.h" #include "make_chain_dialog.h" @@ -110,10 +110,16 @@ private: table->Add (_log_file, wxGBPosition (r, 1)); ++r; + add_label_to_sizer (table, _panel, _("DCP directory"), true, wxGBPosition (r, 0)); + _dcp_directory = new wxDirPickerCtrl (_panel, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1)); + table->Add (_dcp_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)); } void config_changed () @@ -139,6 +145,9 @@ private: if (config->player_log_file()) { checked_set (_log_file, *config->player_log_file()); } + if (config->player_dcp_directory()) { + checked_set (_dcp_directory, *config->player_dcp_directory()); + } } private: @@ -172,10 +181,16 @@ private: Config::instance()->set_player_log_file(wx_to_std(_log_file->GetPath())); } + void dcp_directory_changed () + { + Config::instance()->set_player_dcp_directory(wx_to_std(_dcp_directory->GetPath())); + } + wxChoice* _player_mode; wxChoice* _image_display; wxCheckBox* _respect_kdm; FilePickerCtrl* _log_file; + wxDirPickerCtrl* _dcp_directory; }; wxPreferencesEditor* |
