Use dcp::compose rather than our own.
[dcpomatic.git] / src / tools / dcpomatic_combiner.cc
index 566ec82f1fe8d90e502c2ceb7e963f98a3bd8d9a..0f6004bd27924819e2ef9b0a13b8b178694fe232 100644 (file)
@@ -104,7 +104,13 @@ public:
                        true
                        );
 
-               auto output = new wxBoxSizer (wxHORIZONTAL);
+               auto output = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+               output->AddGrowableCol (1, 1);
+
+               add_label_to_sizer (output, overall_panel, _("Annotation text"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+               _annotation_text = new wxTextCtrl (overall_panel, wxID_ANY, wxT(""));
+               output->Add (_annotation_text, 1, wxEXPAND);
+
                add_label_to_sizer (output, overall_panel, _("Output DCP folder"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _output = new DirPickerCtrl (overall_panel);
                output->Add (_output, 1, wxEXPAND);
@@ -146,7 +152,7 @@ private:
                        if (!confirm_dialog (
                                    this,
                                    std_to_wx (
-                                           String::compose(wx_to_std(_("The directory %1 already exists and is not empty.  "
+                                           dcp::compose(wx_to_std(_("The directory %1 already exists and is not empty.  "
                                                                        "Are you sure you want to use it?")),
                                                            output.string())
                                            )
@@ -156,13 +162,13 @@ private:
                } else if (is_regular_file(output)) {
                        error_dialog (
                                this,
-                               String::compose (wx_to_std(_("%1 already exists as a file, so you cannot use it for a DCP.")), output.string())
+                               dcp::compose (wx_to_std(_("%1 already exists as a file, so you cannot use it for a DCP.")), output.string())
                                );
                        return;
                }
 
                auto jm = JobManager::instance ();
-               jm->add (make_shared<CombineDCPJob>(_inputs, output));
+               jm->add (make_shared<CombineDCPJob>(_inputs, output, wx_to_std(_annotation_text->GetValue())));
                bool const ok = display_progress (_("DCP-o-matic Combine"), _("Combining DCPs"));
                if (!ok) {
                        return;
@@ -189,6 +195,7 @@ private:
        }
 
        EditableList<boost::filesystem::path, DirDialogWrapper>* _input;
+       wxTextCtrl* _annotation_text = nullptr;
        DirPickerCtrl* _output;
        vector<boost::filesystem::path> _inputs;
        Button* _combine;