+ void progress (wxString task)
+ {
+ JobManager* jm = JobManager::instance ();
+
+ wxProgressDialog* progress = new wxProgressDialog (_("DCP-o-matic Player"), task);
+
+ while (jm->work_to_do() || signal_manager->ui_idle()) {
+ dcpomatic_sleep (1);
+ progress->Pulse ();
+ }
+
+ progress->Destroy ();
+ }
+
+ bool report_errors_from_last_job ()
+ {
+ JobManager* jm = JobManager::instance ();
+
+ DCPOMATIC_ASSERT (!jm->get().empty());
+
+ shared_ptr<Job> last = jm->get().back();
+ if (last->finished_in_error()) {
+ error_dialog(this, std_to_wx(last->error_summary()) + ".\n", std_to_wx(last->error_details()));
+ return false;
+ }
+
+ return true;
+ }
+