Slightly better errors when the player fails to load a DCP.
authorCarl Hetherington <cth@carlh.net>
Tue, 27 Aug 2019 21:34:37 +0000 (22:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 27 Aug 2019 21:34:37 +0000 (22:34 +0100)
src/tools/dcpomatic_player.cc
src/wx/wx_util.cc

index 90cc818ca5d85271001c576ce0df8c5a033c37ad..cdacee7848f288e34ab9bb5cbf7471e841e406c9 100644 (file)
@@ -464,6 +464,21 @@ public:
 
 private:
 
+       bool report_errors_from_last_job (wxWindow* parent) const
+       {
+               JobManager* jm = JobManager::instance ();
+
+               DCPOMATIC_ASSERT (!jm->get().empty());
+
+               shared_ptr<Job> last = jm->get().back();
+               if (last->finished_in_error()) {
+                       error_dialog(parent, wxString::Format(_("Could not load DCP.\n\n%s."), std_to_wx(last->error_summary()).data()), std_to_wx(last->error_details()));
+                       return false;
+               }
+
+               return true;
+       }
+
        void setup_menu (wxMenuBar* m)
        {
                _file_menu = new wxMenu;
index d2f463b73ea47dcc7f2792f64e88083235659c2e..045712bcb2f2fdc2246189ca414663e134b31fbe 100644 (file)
@@ -530,19 +530,3 @@ display_progress (wxString title, wxString task)
 
        return ok;
 }
-
-bool
-report_errors_from_last_job (wxWindow* parent)
-{
-       JobManager* jm = JobManager::instance ();
-
-       DCPOMATIC_ASSERT (!jm->get().empty());
-
-       shared_ptr<Job> last = jm->get().back();
-       if (last->finished_in_error()) {
-               error_dialog(parent, std_to_wx(last->error_summary()) + ".\n", std_to_wx(last->error_details()));
-               return false;
-       }
-
-       return true;
-}