- Gtk::TreeRow r;
- if (j == _store->children().end ()) {
- j = _store->append ();
- r = *j;
- r[_columns.name] = (*i)->name ();
- r[_columns.job] = *i;
- r[_columns.progress_unknown] = -1;
- r[_columns.informed_of_finish] = false;
- } else {
- r = *j;
+ for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
+
+ if (_job_records.find (*i) == _job_records.end ()) {
+ 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.finalised = false;
+ r.gauge = new wxGauge (_panel, wxID_ANY, 100);
+ _table->Insert (index + 1, r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT);
+
+ r.message = new wxStaticText (_panel, wxID_ANY, std_to_wx (""));
+ _table->Insert (index + 2, r.message, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+
+ r.details = new wxButton (_panel, wxID_ANY, _("Details..."));
+ r.details->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (JobManagerView::details_clicked), 0, this);
+ r.details->Enable (false);
+ _table->Insert (index + 3, r.details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+
+ _job_records[*i] = r;