X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdvdomatic.cc;h=d5dca2ab4eb3d185cd59e2851a2b498dcbed8883;hb=7b81eb3b0b4e173404c30d754796c7339034c3c5;hp=d5d5bfc2f906ac21c0a7499c636df5041739a98d;hpb=aa230169f8b59b7cb2da9a3bbb8ce5f7600285c0;p=dcpomatic.git diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index d5d5bfc2f..d5dca2ab4 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -288,9 +288,13 @@ public: if (r == wxID_OK) { maybe_save_then_delete_film (); - film.reset (new Film (wx_to_std (c->GetPath ()))); - film->log()->set_level (log_level); - set_film (); + try { + film.reset (new Film (wx_to_std (c->GetPath ()))); + film->log()->set_level (log_level); + set_film (); + } catch (std::exception& e) { + error_dialog (this, String::compose ("Could not open film at %1 (%2)", wx_to_std (c->GetPath()), e.what())); + } } c->Destroy (); @@ -346,7 +350,11 @@ public: { wxAboutDialogInfo info; info.SetName (_("DVD-o-matic")); - info.SetVersion (std_to_wx (String::compose ("version %1 git %2", dvdomatic_version, dvdomatic_git_commit))); + if (strcmp (dvdomatic_git_commit, "release") == 0) { + info.SetVersion (std_to_wx (String::compose ("version %1", dvdomatic_version))); + } else { + info.SetVersion (std_to_wx (String::compose ("version %1 git %2", dvdomatic_version, dvdomatic_git_commit))); + } info.SetDescription (_("Free, open-source DCP generation from almost anything.")); info.SetCopyright (_("(C) Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen")); wxArrayString authors; @@ -364,13 +372,13 @@ public: static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_OPTION, "l", "log", "set log level (silent, verbose or timing)", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_PARAM, 0, 0, "film to load", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_NONE } + { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 } }; #else static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_OPTION, wxT("l"), wxT("log"), wxT("set log level (silent, verbose or timing)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_PARAM, 0, 0, wxT("film to load"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_NONE } + { wxCMD_LINE_NONE, wxT(""), wxT(""), wxT(""), wxCmdLineParamType (0), 0 } }; #endif