summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-07 10:35:17 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-07 10:35:17 +0000
commitb4c8f8b0788125a1fcc209ad50aee2021a32d324 (patch)
tree15c15e338d9c9fbc9fc9474c775ba675798b97ea
parent29a3d5d116da0626f71bf488b0408bd461327184 (diff)
Open file dialog starts in the configured DCP directory (#70).
-rw-r--r--ChangeLog5
-rw-r--r--src/tools/dcpomatic.cc8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bf58b0852..43e9cd7df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-07 Carl Hetherington <cth@carlh.net>
+
+ * Open file dialog starts in the configured DCP directory,
+ if one exists (#70).
+
2013-11-06 Carl Hetherington <cth@carlh.net>
* Support pixel format 30 (#254).
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index af620c5a2..1fea4fb1a 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -354,7 +354,13 @@ private:
void file_open ()
{
- wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
+ wxDirDialog* c = new wxDirDialog (
+ this,
+ _("Select film to open"),
+ std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
+ wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST
+ );
+
int r;
while (1) {
r = c->ShowModal ();