diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-16 16:24:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-16 16:24:33 +0100 |
| commit | 03c5a8155043613c01e0e151735a7fcf8ab84415 (patch) | |
| tree | 671045ad4731e1782e92be9109f48da8b5726081 /src/wx/name_format_editor.cc | |
| parent | 47e78514ffa98c991ddd38d077836f4a558fbec0 (diff) | |
Tidy up a few details with custom filenames.
Diffstat (limited to 'src/wx/name_format_editor.cc')
| -rw-r--r-- | src/wx/name_format_editor.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/name_format_editor.cc b/src/wx/name_format_editor.cc index 7d0915896..160a554c0 100644 --- a/src/wx/name_format_editor.cc +++ b/src/wx/name_format_editor.cc @@ -21,13 +21,16 @@ #include "name_format_editor.h" #include "wx_util.h" -NameFormatEditor::NameFormatEditor (wxWindow* parent, dcp::NameFormat name, dcp::NameFormat::Map titles, dcp::NameFormat::Map examples) +using std::string; + +NameFormatEditor::NameFormatEditor (wxWindow* parent, dcp::NameFormat name, dcp::NameFormat::Map titles, dcp::NameFormat::Map examples, string suffix) : _panel (new wxPanel (parent)) , _example (new wxStaticText (_panel, wxID_ANY, "")) , _sizer (new wxBoxSizer (wxVERTICAL)) , _specification (new wxTextCtrl (_panel, wxID_ANY, "")) , _name (name) , _examples (examples) + , _suffix (suffix) { _sizer->Add (_specification, 0, wxEXPAND, DCPOMATIC_SIZER_Y_GAP); _sizer->Add (_example, 0, wxBOTTOM, DCPOMATIC_SIZER_Y_GAP); @@ -61,7 +64,7 @@ NameFormatEditor::update_example () { _name.set_specification (wx_to_std (_specification->GetValue ())); - wxString example = wxString::Format (_("e.g. %s"), _name.get (_examples)); + wxString example = wxString::Format (_("e.g. %s"), _name.get (_examples, _suffix)); wxString wrapped; for (size_t i = 0; i < example.Length(); ++i) { if (i > 0 && (i % 40) == 0) { |
