X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fjob_manager_view.cc;h=dcef5f4fd24d374bf0cda9ca538d1100590565a1;hb=a5e041b46b675c1f42fc83920be45345662e0376;hp=cd6918b7268e730c7a93d4e8d1a796293c7cadf9;hpb=0ef231d6ef3c483edc5d13affd31367acfecd320;p=dcpomatic.git diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index cd6918b72..dcef5f4fd 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -40,9 +40,15 @@ using std::cout; using boost::shared_ptr; using boost::weak_ptr; -/** Must be called in the GUI thread */ -JobManagerView::JobManagerView (wxWindow* parent) +/** @param parent Parent window. + * @param latest_at_top true to put the last-added job at the top of the view, + * false to put it at the bottom. + * + * Must be called in the GUI thread. + */ +JobManagerView::JobManagerView (wxWindow* parent, bool latest_at_top) : wxScrolledWindow (parent) + , _latest_at_top (latest_at_top) { _panel = new wxPanel (this); wxSizer* sizer = new wxBoxSizer (wxVERTICAL); @@ -68,7 +74,7 @@ JobManagerView::job_added (weak_ptr j) { shared_ptr job = j.lock (); if (job) { - _job_records.push_back (shared_ptr (new JobView (job, this, _panel, _table))); + _job_records.push_back (shared_ptr (new JobView (job, this, _panel, _table, _latest_at_top))); } }