- if (!(*i)->finished ()) {
- float const p = (*i)->overall_progress ();
- if (p >= 0) {
- _job_records[*i].message->SetLabel (std_to_wx (st));
- _job_records[*i].gauge->SetValue (p * 100);
- } else {
- _job_records[*i].message->SetLabel (wxT ("Running"));
- _job_records[*i].gauge->Pulse ();
- }
- }
-
- /* Hack to work around our lack of cross-thread
- signalling; we tell the job to emit_finished()
- from here (the GUI thread).
- */
-
- if ((*i)->finished () && !_job_records[*i].informed_of_finish) {
- _job_records[*i].gauge->SetValue (100);
- _job_records[*i].message->SetLabel (std_to_wx (st));
-
- try {
- (*i)->emit_finished ();
- } catch (OpenFileError& e) {
- stringstream s;
- s << "Error: " << e.what();
- error_dialog (this, s.str ());
+ list<shared_ptr<JobView> > new_job_records;
+
+ BOOST_FOREACH (shared_ptr<Job> i, JobManager::instance()->get()) {
+ /* Find this job's JobView */
+ BOOST_FOREACH (shared_ptr<JobView> j, _job_records) {
+ if (j->job() == i) {
+ new_job_records.push_back (j);
+ break;