diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-07 15:20:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-07 15:20:47 +0100 |
| commit | fea8c3743fd0710c2716fc6de5a283d378338800 (patch) | |
| tree | 6c751fa876048a215b7f3804b7b02fcaa6ee89c1 /src | |
| parent | ec5ff2e9bf1c81f9a11ff22ede039c83c2163885 (diff) | |
Give a hopefully helpful message when clicking Open without selecting a folder (#99).
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dvdomatic.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index b408ef505..80a33efef 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -317,8 +317,16 @@ private: void file_open (wxCommandEvent &) { wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST); - int const r = c->ShowModal (); - + int r; + while (1) { + r = c->ShowModal (); + if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) { + error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open.")); + } else { + break; + } + } + if (r == wxID_OK) { maybe_save_then_delete_film (); try { |
