Reverse order of jobs in the batch converter view.
[dcpomatic.git] / src / wx / job_manager_view.cc
index cd6918b7268e730c7a93d4e8d1a796293c7cadf9..dcef5f4fd24d374bf0cda9ca538d1100590565a1 100644 (file)
@@ -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<Job> j)
 {
        shared_ptr<Job> job = j.lock ();
        if (job) {
-               _job_records.push_back (shared_ptr<JobView> (new JobView (job, this, _panel, _table)));
+               _job_records.push_back (shared_ptr<JobView> (new JobView (job, this, _panel, _table, _latest_at_top)));
        }
 }