summaryrefslogtreecommitdiff
path: root/src/wx/kdm_output_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-06 19:37:36 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-06 19:37:36 +0100
commitcf7d4e462769264868588be5c46b0c968eb570c9 (patch)
tree09b4bdcc6fe379be0d0d7d40e279e1e61537251f /src/wx/kdm_output_panel.cc
parent220fe9ef5a0f9198630d3335fa901fd9c41b14f4 (diff)
Tweak layout and remove some code duplication.
Diffstat (limited to 'src/wx/kdm_output_panel.cc')
-rw-r--r--src/wx/kdm_output_panel.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc
index 3befd7025..6d741cf5e 100644
--- a/src/wx/kdm_output_panel.cc
+++ b/src/wx/kdm_output_panel.cc
@@ -61,31 +61,11 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent, bool interop)
table->Add (_type, 1, wxEXPAND);
_type->SetSelection (0);
- {
- int flags = wxALIGN_TOP | wxTOP | wxLEFT | wxRIGHT;
- wxString t = _("Folder / ZIP name format");
-#ifdef __WXOSX__
- flags |= wxALIGN_RIGHT;
- t += wxT (":");
-#endif
- wxStaticText* m = new wxStaticText (this, wxID_ANY, t);
- table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP);
- }
-
+ add_label_to_sizer (table, this, _("Folder / ZIP name format"), true, 0, wxALIGN_TOP | wxTOP | wxLEFT | wxRIGHT);
_container_name_format = new NameFormatEditor (this, Config::instance()->kdm_container_name_format(), dcp::NameFormat::Map(), dcp::NameFormat::Map(), "");
table->Add (_container_name_format->panel(), 1, wxEXPAND);
- {
- int flags = wxALIGN_TOP | wxTOP | wxLEFT | wxRIGHT;
- wxString t = _("Filename format");
-#ifdef __WXOSX__
- flags |= wxALIGN_RIGHT;
- t += wxT (":");
-#endif
- wxStaticText* m = new wxStaticText (this, wxID_ANY, t);
- table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP);
- }
-
+ add_label_to_sizer (table, this, _("Filename format"), true, 0, wxALIGN_TOP | wxTOP | wxLEFT | wxRIGHT);
dcp::NameFormat::Map titles;
titles['f'] = "film name";
titles['c'] = "cinema";