diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-24 20:12:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-24 20:12:43 +0100 |
| commit | 977b36672892b14de4ecb68e98415c64946e8a93 (patch) | |
| tree | 2e264ce029fdd9d0abe6e9e958111a5ddd2cea45 /src/wx | |
| parent | baf6bc63df6577d6efdc12ae605aa94754b73882 (diff) | |
Tidy up now we have a x-thread signaller.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/job_manager_view.cc | 16 | ||||
| -rw-r--r-- | src/wx/job_manager_view.h | 1 |
2 files changed, 1 insertions, 16 deletions
diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index 97da3936f..a6eef6e34 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -79,7 +79,6 @@ JobManagerView::update () r.gauge = new wxGauge (_panel, wxID_ANY, 100); _table->Insert (index + 1, r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT); - r.informed_of_finish = false; r.message = new wxStaticText (_panel, wxID_ANY, std_to_wx ("")); _table->Insert (index + 2, r.message, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6); @@ -99,22 +98,9 @@ JobManagerView::update () } } - /* 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) { + if ((*i)->finished()) { _job_records[*i].gauge->SetValue (100); _job_records[*i].message->SetLabel (std_to_wx (st)); - - try { - (*i)->emit_finished (); - } catch (OpenFileError& e) { - error_dialog (this, String::compose ("Error: %1", e.what ())); - } - - _job_records[*i].informed_of_finish = true; } index += 3; diff --git a/src/wx/job_manager_view.h b/src/wx/job_manager_view.h index 5a3ae61cb..b10446cdd 100644 --- a/src/wx/job_manager_view.h +++ b/src/wx/job_manager_view.h @@ -46,7 +46,6 @@ private: struct JobRecord { wxGauge* gauge; wxStaticText* message; - bool informed_of_finish; }; std::map<boost::shared_ptr<Job>, JobRecord> _job_records; |
