/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
+#include "dcpomatic_button.h"
#include "normal_job_view.h"
#include "lib/job.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
+
+
+using std::shared_ptr;
-using boost::shared_ptr;
NormalJobView::NormalJobView (shared_ptr<Job> job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table)
: JobView (job, parent, container, table)
- , _pause (0)
{
}
+
void
NormalJobView::finish_setup (wxWindow* parent, wxSizer* sizer)
{
- _pause = new wxButton (parent, wxID_ANY, _("Pause"));
+ _pause = new Button (parent, _("Pause"));
_pause->Bind (wxEVT_BUTTON, boost::bind (&NormalJobView::pause_clicked, this));
sizer->Add (_pause, 1, wxALIGN_CENTER_VERTICAL);
}
int
+
NormalJobView::insert_position () const
{
return 0;
}
+
void
NormalJobView::pause_clicked ()
{
- if (_job->paused()) {
+ if (_job->paused_by_user()) {
_job->resume ();
_pause->SetLabel (_("Pause"));
} else {
- _job->pause ();
+ _job->pause_by_user ();
_pause->SetLabel (_("Resume"));
}
}
+
void
NormalJobView::finished ()
{