+
+ 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);
+ }
+ if (Config::instance()->notification(Config::EMAIL)) {
+ 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_after (_job, shared_ptr<Job> (new SendNotificationEmailJob (body)));
+ }
+ }