summaryrefslogtreecommitdiff
path: root/src/wx/job_manager_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-30 10:42:30 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-30 10:42:30 +0100
commita5e041b46b675c1f42fc83920be45345662e0376 (patch)
tree65c9728693ed5f22028e5eeceeefad239f027919 /src/wx/job_manager_view.cc
parent0ef231d6ef3c483edc5d13affd31367acfecd320 (diff)
Reverse order of jobs in the batch converter view.
Diffstat (limited to 'src/wx/job_manager_view.cc')
-rw-r--r--src/wx/job_manager_view.cc12
1 files changed, 9 insertions, 3 deletions
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<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)));
}
}