#include "job.h"
#include "util.h"
#include "cross.h"
+#include "ui_signaller.h"
#include "i18n.h"
using std::stringstream;
using boost::shared_ptr;
-/** @param s Film that we are operating on.
- */
-Job::Job (shared_ptr<Film> f)
+Job::Job (shared_ptr<const Film> f)
: _film (f)
, _thread (0)
, _state (NEW)
set_state (FINISHED_ERROR);
set_error (
e.what (),
- _("It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
+ _("It is not known what caused this error. The best idea is to report the problem to the DCP-o-matic mailing list (dcpomatic@carlh.net)")
);
} catch (...) {
set_state (FINISHED_ERROR);
set_error (
_("Unknown error"),
- _("It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
+ _("It is not known what caused this error. The best idea is to report the problem to the DCP-o-matic mailing list (dcpomatic@carlh.net)")
);
}
boost::mutex::scoped_lock lm (_state_mutex);
_state = s;
- if (_state == FINISHED_OK || _state == FINISHED_ERROR) {
+ if (_state == FINISHED_OK || _state == FINISHED_ERROR || _state == FINISHED_CANCELLED) {
_ran_for = elapsed_time ();
+ if (ui_signaller) {
+ ui_signaller->emit (boost::bind (boost::ref (Finished)));
+ }
}
}
boost::this_thread::interruption_point ();
if (paused ()) {
- dvdomatic_sleep (1);
+ dcpomatic_sleep (1);
}
}