#include "file_picker_ctrl.h"
#include "filter_dialog.h"
#include "full_config_dialog.h"
+#include "kdm_choice.h"
#include "make_chain_dialog.h"
#include "nag_dialog.h"
#include "name_format_editor.h"
#else
_kdm_directory = new wxDirPickerCtrl (_panel, wxDD_DIR_MUST_EXIST);
#endif
-
table->Add (_kdm_directory, 1, wxEXPAND);
+ add_label_to_sizer (table, _panel, _("Default KDM type"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ _kdm_type = new KDMChoice (_panel);
+ table->Add (_kdm_type, 1, wxEXPAND);
+
+ table->Add (_use_isdcf_name_by_default = new CheckBox(_panel, _("Use ISDCF name by default")), 0, wxALIGN_CENTRE_VERTICAL);
+
_still_length->SetRange (1, 3600);
_still_length->Bind (wxEVT_SPINCTRL, boost::bind (&DefaultsPage::still_length_changed, this));
_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
_kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::kdm_directory_changed, this));
+ _kdm_type->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_type_changed, this));
+
+ _use_isdcf_name_by_default->Bind (wxEVT_CHECKBOX, boost::bind(&DefaultsPage::use_isdcf_name_by_default_changed, this));
for (auto i: Ratio::containers()) {
_container->Append (std_to_wx(i->container_nickname()));
checked_set (_still_length, config->default_still_length ());
_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
_kdm_directory->SetPath (std_to_wx (config->default_kdm_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
+ _kdm_type->set (config->default_kdm_type());
+ checked_set (_use_isdcf_name_by_default, config->use_isdcf_name_by_default());
checked_set (_j2k_bandwidth, config->default_j2k_bandwidth() / 1000000);
_j2k_bandwidth->SetRange (50, config->maximum_j2k_bandwidth() / 1000000);
checked_set (_dcp_audio_channels, locale_convert<string> (config->default_dcp_audio_channels()));
Config::instance()->set_default_kdm_directory (wx_to_std (_kdm_directory->GetPath ()));
}
+ void kdm_type_changed ()
+ {
+ Config::instance()->set_default_kdm_type(_kdm_type->get());
+ }
+
+ void use_isdcf_name_by_default_changed ()
+ {
+ Config::instance()->set_use_isdcf_name_by_default (_use_isdcf_name_by_default->GetValue());
+ }
+
void still_length_changed ()
{
Config::instance()->set_default_still_length (_still_length->GetValue ());
wxDirPickerCtrl* _directory;
wxDirPickerCtrl* _kdm_directory;
#endif
+ KDMChoice* _kdm_type;
+ wxCheckBox* _use_isdcf_name_by_default;
wxChoice* _container;
wxChoice* _dcp_content_type;
wxChoice* _dcp_audio_channels;
private:
void setup ()
{
- wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+ auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
- _panel->GetSizer()->Add (table, 1, wxEXPAND | wxALL, _border);
+ _panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
add_label_to_sizer (table, _panel, _("Subject"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_subject = new wxTextCtrl (_panel, wxID_ANY);
{
auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
- _panel->GetSizer()->Add (table, 1, wxEXPAND | wxALL, _border);
+ _panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
_enable_message_box = new CheckBox (_panel, _("Message box"));
table->Add (_enable_message_box, 1, wxEXPAND | wxALL);
{
add_top_aligned_label_to_sizer (table, _panel, _("Log"));
- auto t = new wxBoxSizer (wxVERTICAL);
+ auto t = new wxFlexGridSizer (2);
_log_general = new CheckBox (_panel, _("General"));
t->Add (_log_general, 1, wxEXPAND | wxALL);
_log_warning = new CheckBox (_panel, _("Warnings"));
_maximum_j2k_bandwidth->SetRange (1, 1000);
_maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
_video_display_mode->Append (_("Simple (safer)"));
+#if wxCHECK_VERSION(3, 1, 0)
_video_display_mode->Append (_("OpenGL (faster)"));
+#endif
_video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this));
_allow_any_dcp_frame_rate->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
_allow_any_container->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_container_changed, this));
the containing window doesn't shrink too much when we select those panels.
This is obviously an unpleasant hack.
*/
- wxSize ps = wxSize (700, -1);
+ wxSize ps = wxSize (750, -1);
int const border = 16;
#else
wxSize ps = wxSize (-1, -1);