diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-25 22:30:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-25 22:30:16 +0100 |
| commit | 98128670536a3f1d8670898b15700a8858145c73 (patch) | |
| tree | b015d661a2871e517cb2ae1ed67dcccd2462ba2a /src | |
| parent | 493fa08920fbed2d8cda546d86a2b5e68083ed58 (diff) | |
Improve GUI when jobs are inserted by other jobs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/job_manager_view.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index c9e120135..1d5c855ea 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -67,15 +67,21 @@ JobManagerView::update () { list<shared_ptr<Job> > jobs = JobManager::instance()->get (); + int index = 0; + for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) { if (_job_records.find (*i) == _job_records.end ()) { - add_label_to_sizer (_table, _panel, (*i)->name ()); + wxStaticText* m = new wxStaticText (_panel, wxID_ANY, std_to_wx ((*i)->name ())); + _table->Insert (index, m, 0, wxALIGN_CENTER_VERTICAL | wxALL, 6); + JobRecord r; r.gauge = new wxGauge (_panel, wxID_ANY, 100); - _table->Add (r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT); + _table->Insert (index + 1, r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT); + r.informed_of_finish = false; - r.message = add_label_to_sizer (_table, _panel, "", 1); + r.message = new wxStaticText (_panel, wxID_ANY, std_to_wx ("")); + _table->Insert (index + 2, r.message, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6); _job_records[*i] = r; } @@ -112,6 +118,8 @@ JobManagerView::update () _job_records[*i].informed_of_finish = true; } + + index += 3; } _table->Layout (); |
