Just call it the Combiner not the DCP Combiner.
[dcpomatic.git] / src / tools / dcpomatic_combiner.cc
index e773e4a37e3bfcaef0dc77df8592e36fb8bd922b..c135184e6a7f04a5ce1eb94b45e1456cec0d3012 100644 (file)
 */
 
 
+#include "wx/dir_dialog.h"
 #include "wx/dir_picker_ctrl.h"
 #include "wx/editable_list.h"
 #include "wx/wx_signal_manager.h"
 #include "lib/combine_dcp_job.h"
 #include "lib/config.h"
+#include "lib/constants.h"
 #include "lib/cross.h"
 #include "lib/job_manager.h"
-#include "lib/util.h"
 #include <dcp/combine.h>
 LIBDCP_DISABLE_WARNINGS
 #include <wx/filepicker.h>
@@ -56,18 +57,23 @@ display_string (boost::filesystem::path p, int)
 }
 
 
-class DirDialogWrapper : public wxDirDialog
+class DirDialogWrapper : public DirDialog
 {
 public:
        DirDialogWrapper (wxWindow* parent)
-               : wxDirDialog (parent, _("Choose a DCP folder"), wxT(""), wxDD_DIR_MUST_EXIST)
+               : DirDialog (parent, _("Choose a DCP folder"), wxDD_DIR_MUST_EXIST, "AddCombinerInputPath")
        {
 
        }
 
+       virtual int ShowModal() override
+       {
+               return DirDialog::show() ? wxID_OK : wxID_CANCEL;
+       }
+
        optional<boost::filesystem::path> get () const
        {
-               return boost::filesystem::path(wx_to_std(GetPath()));
+               return path();
        }
 
        void set (boost::filesystem::path)
@@ -169,7 +175,7 @@ private:
 
                auto jm = JobManager::instance ();
                jm->add (make_shared<CombineDCPJob>(_inputs, output, wx_to_std(_annotation_text->GetValue())));
-               bool const ok = display_progress (_("DCP-o-matic Combine"), _("Combining DCPs"));
+               bool const ok = display_progress(_("DCP-o-matic Combiner"), _("Combining DCPs"));
                if (!ok) {
                        return;
                }
@@ -247,7 +253,7 @@ public:
                        */
                        Config::drop ();
 
-                       _frame = new DOMFrame (_("DCP-o-matic DCP Combiner"));
+                       _frame = new DOMFrame(_("DCP-o-matic Combiner"));
                        SetTopWindow (_frame);
 
                        _frame->Show ();
@@ -257,7 +263,7 @@ public:
                }
                catch (exception& e)
                {
-                       error_dialog (nullptr, wxString::Format ("DCP-o-matic DCP Combiner could not start."), std_to_wx(e.what()));
+                       error_dialog(nullptr, wxString::Format("DCP-o-matic Combiner could not start."), std_to_wx(e.what()));
                        return false;
                }