Tweak crop layout.
[dcpomatic.git] / src / wx / job_view.cc
index d0086ff81aae2acbbe332164f36489355b5f9a0f..5d3cc0f9cf74ad2c0eabb5ea2824d268168f9fa1 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "job_view.h"
 #include "wx_util.h"
+#include "message_dialog.h"
 #include "lib/job.h"
 #include "lib/job_manager.h"
 #include "lib/compose.hpp"
@@ -134,6 +135,12 @@ JobView::finished ()
                _details->Enable (true);
        }
 
+       if (_job->message()) {
+               MessageDialog* d = new MessageDialog (_parent, _job->name(), _job->message().get());
+               d->ShowModal ();
+               d->Destroy ();
+       }
+
        if ((dynamic_pointer_cast<TranscodeJob>(_job) || dynamic_pointer_cast<AnalyseAudioJob>(_job)) && _notify->GetValue()) {
                if (Config::instance()->notification(Config::MESSAGE_BOX)) {
                        wxMessageBox (std_to_wx(_job->name() + ": " + _job->status()), _("DCP-o-matic"), wxICON_INFORMATION);
@@ -142,7 +149,7 @@ JobView::finished ()
                        string body = Config::instance()->notification_email();
                        boost::algorithm::replace_all (body, "$JOB_NAME", _job->name());
                        boost::algorithm::replace_all (body, "$JOB_STATUS", _job->status());
-                       JobManager::instance()->add (shared_ptr<Job> (new SendNotificationEmailJob (body)));
+                       JobManager::instance()->add_after (_job, shared_ptr<Job> (new SendNotificationEmailJob (body)));
                }
        }
 }