From aa8bb7b6f6fe2eed323e6f4f978a76a9a067c545 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 29 Dec 2024 01:58:15 +0100 Subject: Separate KDM output options yet further. Trying here to get them to fit vertically in 768 pixels. --- src/wx/kdm_output_panel.cc | 9 +++++++-- src/wx/kdm_output_panel.h | 1 + src/wx/short_kdm_output_panel.cc | 18 ++++++++++++++++++ src/wx/short_kdm_output_panel.h | 1 + src/wx/tall_kdm_output_panel.cc | 1 + 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index 3788c3fce..30660c6af 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -128,6 +128,13 @@ KDMOutputPanel::create_details_widgets(wxWindow* parent) _advanced = new Button(parent, _("Advanced...")); _annotation_text = new wxTextCtrl(parent, wxID_ANY); + _advanced->Bind(wxEVT_BUTTON, boost::bind (&KDMOutputPanel::advanced_clicked, this)); +} + + +void +KDMOutputPanel::create_name_format_widgets(wxWindow* parent) +{ _container_name_format = new NameFormatEditor(parent, Config::instance()->kdm_container_name_format(), dcp::NameFormat::Map(), dcp::NameFormat::Map(), ""); dcp::NameFormat::Map titles; @@ -143,8 +150,6 @@ KDMOutputPanel::create_details_widgets(wxWindow* parent) ex['b'] = "2012/03/15 12:30"; ex['e'] = "2012/03/22 02:30"; _filename_format = new NameFormatEditor(parent, Config::instance()->kdm_filename_format(), titles, ex, ".xml"); - - _advanced->Bind(wxEVT_BUTTON, boost::bind (&KDMOutputPanel::advanced_clicked, this)); } diff --git a/src/wx/kdm_output_panel.h b/src/wx/kdm_output_panel.h index dd4dbb1fc..84cfdecd7 100644 --- a/src/wx/kdm_output_panel.h +++ b/src/wx/kdm_output_panel.h @@ -77,6 +77,7 @@ public: protected: void create_destination_widgets(wxWindow* parent); void create_details_widgets(wxWindow* parent); + void create_name_format_widgets(wxWindow* parent); KDMChoice* _type; wxTextCtrl* _annotation_text; diff --git a/src/wx/short_kdm_output_panel.cc b/src/wx/short_kdm_output_panel.cc index 8ecd112f7..5a0fb2504 100644 --- a/src/wx/short_kdm_output_panel.cc +++ b/src/wx/short_kdm_output_panel.cc @@ -51,6 +51,11 @@ ShortKDMOutputPanel::ShortKDMOutputPanel(wxWindow* parent) fill_details_panel(details); notebook->AddPage(details, _("Details")); + auto name_formats = new wxPanel(notebook, wxID_ANY); + create_name_format_widgets(name_formats); + fill_name_formats_panel(name_formats); + notebook->AddPage(name_formats, _("Name formats")); + auto sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(notebook, 1, wxEXPAND); SetSizer(sizer); @@ -98,6 +103,18 @@ ShortKDMOutputPanel::fill_details_panel(wxPanel* panel) add_label_to_sizer(table, panel, _("Annotation text"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL); table->Add(_annotation_text, 1, wxEXPAND); + auto padding = new wxBoxSizer(wxVERTICAL); + padding->Add(table, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); + panel->SetSizer(padding); +} + + +void +ShortKDMOutputPanel::fill_name_formats_panel(wxPanel* panel) +{ + auto table = new wxFlexGridSizer(2, DCPOMATIC_SIZER_X_GAP, 0); + table->AddGrowableCol(1); + add_label_to_sizer(table, panel, _("Folder / ZIP name format"), true, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT); table->Add(_container_name_format->panel(), 1, wxEXPAND); @@ -116,3 +133,4 @@ ShortKDMOutputPanel::fill_details_panel(wxPanel* panel) padding->Add(table, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); panel->SetSizer(padding); } + diff --git a/src/wx/short_kdm_output_panel.h b/src/wx/short_kdm_output_panel.h index eed2950e0..3f328d0c3 100644 --- a/src/wx/short_kdm_output_panel.h +++ b/src/wx/short_kdm_output_panel.h @@ -34,5 +34,6 @@ public: private: void fill_destination_panel(wxPanel* panel); void fill_details_panel(wxPanel* panel); + void fill_name_formats_panel(wxPanel* panel); }; diff --git a/src/wx/tall_kdm_output_panel.cc b/src/wx/tall_kdm_output_panel.cc index d0bb3d7dd..d34c5460d 100644 --- a/src/wx/tall_kdm_output_panel.cc +++ b/src/wx/tall_kdm_output_panel.cc @@ -65,6 +65,7 @@ TallKDMOutputPanel::TallKDMOutputPanel(wxWindow* parent) { create_destination_widgets(this); create_details_widgets(this); + create_name_format_widgets(this); auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, 0); table->AddGrowableCol (1); -- cgit v1.2.3