diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-03 20:34:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-03 20:34:01 +0100 |
| commit | 98a10c9874d28e2e52f7495549b80528372ffbfb (patch) | |
| tree | e8a4ca41faacfc435e9f331f63ae3abc86536000 /src/wx/content_panel.cc | |
| parent | b40f6bc1a3ab39b1bc0fa8fda1f97cb6a01bc85c (diff) | |
Generalise add_files_path to initial_paths().
Diffstat (limited to 'src/wx/content_panel.cc')
| -rw-r--r-- | src/wx/content_panel.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 9de22e844..e035d1795 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -579,7 +579,7 @@ ContentPanel::add_file_clicked () return; } - auto path = Config::instance()->add_files_path(); + auto path = Config::instance()->initial_path("AddFilesPath"); /* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using non-Latin filenames or paths. @@ -609,7 +609,7 @@ ContentPanel::add_file_clicked () add_files (path_list); if (!path_list.empty()) { - Config::instance()->set_add_files_path(path_list[0].parent_path()); + Config::instance()->set_initial_path("AddFilesPath", path_list[0].parent_path()); } d->Destroy (); @@ -619,7 +619,7 @@ ContentPanel::add_file_clicked () void ContentPanel::add_folder_clicked () { - auto const initial_path = Config::instance()->add_files_path(); + auto const initial_path = Config::instance()->initial_path("AddFilesPath"); auto d = new wxDirDialog(_splitter, _("Choose a folder"), std_to_wx(initial_path ? initial_path->string() : home_directory().string()), wxDD_DIR_MUST_EXIST); ScopeGuard sg = [d]() { d->Destroy(); }; @@ -673,7 +673,7 @@ ContentPanel::add_folder(boost::filesystem::path folder) void ContentPanel::add_dcp_clicked () { - auto const initial_path = Config::instance()->add_files_path(); + auto const initial_path = Config::instance()->initial_path("AddFilesPath"); auto d = new wxDirDialog(_splitter, _("Choose a DCP folder"), std_to_wx(initial_path ? initial_path->string() : home_directory().string()), wxDD_DIR_MUST_EXIST); ScopeGuard sg = [d]() { d->Destroy(); }; |
