summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-07 20:13:14 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-07 20:13:14 +0100
commite572ffd2e0bdc59cd00103a242d290d89e039c93 (patch)
tree846deb239f7fefbb4df433e30df060dcc1b4b004
parentbd24f28d9d78c40d1f790c4213100532407ff783 (diff)
Remember paths in the add input dir picker in the combiner.
-rw-r--r--src/lib/config.cc1
-rw-r--r--src/tools/dcpomatic_combiner.cc12
2 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 5db5cf35f..e3325859f 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -189,6 +189,7 @@ Config::set_defaults ()
_initial_paths["AddFilesPath"] = boost::none;
_initial_paths["AddDKDMPath"] = boost::none;
_initial_paths["SelectCertificatePath"] = boost::none;
+ _initial_paths["AddCombinerInputPath"] = boost::none;
_use_isdcf_name_by_default = true;
_write_kdms_to_disk = true;
_email_kdms = false;
diff --git a/src/tools/dcpomatic_combiner.cc b/src/tools/dcpomatic_combiner.cc
index fb788ef6b..8e7337f65 100644
--- a/src/tools/dcpomatic_combiner.cc
+++ b/src/tools/dcpomatic_combiner.cc
@@ -19,6 +19,7 @@
*/
+#include "wx/dir_dialog.h"
#include "wx/dir_picker_ctrl.h"
#include "wx/editable_list.h"
#include "wx/wx_signal_manager.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)