-/** Must be called in the GUI thread */
-JobManagerView::JobManagerView (wxWindow* parent, Buttons buttons)
- : wxScrolledWindow (parent)
- , _buttons (buttons)
-{
- _panel = new wxPanel (this);
- wxSizer* sizer = new wxBoxSizer (wxVERTICAL);
- sizer->Add (_panel, 1, wxEXPAND);
- SetSizer (sizer);
-
- int N = 5;
- if (buttons & PAUSE) {
- ++N;
- }
-
- _table = new wxFlexGridSizer (N, 6, 6);
- _table->AddGrowableCol (1, 1);
- _panel->SetSizer (_table);
-
- SetScrollRate (0, 32);
-
- JobManager::instance()->JobAdded.connect (bind (&JobManagerView::job_added, this, _1));
-}
-
-void
-JobManagerView::job_added (weak_ptr<Job> j)