Separate KDM output options yet further.
authorCarl Hetherington <cth@carlh.net>
Sun, 29 Dec 2024 00:58:15 +0000 (01:58 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 Jan 2025 00:54:38 +0000 (01:54 +0100)
Trying here to get them to fit vertically in 768 pixels.

src/wx/kdm_output_panel.cc
src/wx/kdm_output_panel.h
src/wx/short_kdm_output_panel.cc
src/wx/short_kdm_output_panel.h
src/wx/tall_kdm_output_panel.cc

index 3788c3fce2e5b0dc6ec48e0d46f94f48d65e8796..30660c6af5dff8315373d2e59b67a6a7ddd09856 100644 (file)
@@ -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));
 }
 
 
index dd4dbb1fc8c443b7e35c1458a9046c700112aa2c..84cfdecd7e6317c6abed32107a913e2b300901fd 100644 (file)
@@ -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;
index 8ecd112f72bf24a7ff58b76108f3a9124448ce83..5a0fb2504aec248eaac965bfc942ce2bc2fd5518 100644 (file)
@@ -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);
 }
+
index eed2950e0db547b484b21c9cf3f790d33212ec88..3f328d0c3289c9da706fe31b70f54b2bc072abef 100644 (file)
@@ -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);
 };
 
index d0bb3d7dde81593178f1371407464e1ac161fd40..d34c5460d66b67d0758830eb86461eee8c2d2f71 100644 (file)
@@ -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);