Remember paths in the add input dir picker in the combiner.
authorCarl Hetherington <cth@carlh.net>
Sat, 7 Jan 2023 19:13:14 +0000 (20:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 7 Jan 2023 19:13:14 +0000 (20:13 +0100)
src/lib/config.cc
src/tools/dcpomatic_combiner.cc

index 5db5cf35fe3145f14bf1653bc2c416e0d63491b8..e3325859f017d98b10a5b39f4e2f4cd40293e83c 100644 (file)
@@ -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;
index fb788ef6b51d558ebd7f0c6d3620e0eff127d40a..8e7337f65b06e95748ec78c21f22bd129ba6c410 100644 (file)
@@ -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)