Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / wx / wx_util.cc
index bfc7c30690936ec405cd0833c6719030d1403d62..28f79431a5147171626e1b45b90d51630b4420c9 100644 (file)
@@ -44,6 +44,7 @@ using std::pair;
 using boost::shared_ptr;
 using boost::optional;
 using dcp::locale_convert;
+using namespace dcpomatic;
 
 wxStaticText *
 #ifdef __WXOSX__
@@ -158,6 +159,7 @@ message_dialog (wxWindow* parent, wxString m)
        d->Destroy ();
 }
 
+/** @return true if the user answered "yes" */
 bool
 confirm_dialog (wxWindow* parent, wxString m)
 {
@@ -515,7 +517,7 @@ display_progress (wxString title, wxString task)
        bool ok = true;
 
        while (jm->work_to_do()) {
-               dcpomatic_sleep (1);
+               dcpomatic_sleep_seconds (1);
                if (!progress.Pulse()) {
                        /* user pressed cancel */
                        BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
@@ -528,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;
-}