_gauge = new wxGauge (this, wxID_ANY, 100);
sizer->Add (_gauge, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
_gauge = new wxGauge (this, wxID_ANY, 100);
sizer->Add (_gauge, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
sizer->Add (_gauge_message, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
_text = new wxRichTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (400, 300), wxRE_READONLY);
sizer->Add (_text, 1, wxEXPAND | wxALL, 6);
if (!ok) {
sizer->Add (_gauge_message, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
_text = new wxRichTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (400, 300), wxRE_READONLY);
sizer->Add (_text, 1, wxEXPAND | wxALL, 6);
if (!ok) {
sizer->Add (b, 0, wxALL, 6);
sizer->Add (b, 0, wxALL, 6);
- b->Bind (wxEVT_CHECKBOX, bind (&HintsDialog::shut_up, this, _1));
+ b->bind(&HintsDialog::shut_up, this, _1);
- buttons->SetAffirmativeButton (new wxButton (this, wxID_OK, _("Make DCP")));
+ default_button = new wxButton(this, wxID_OK, _("Make DCP"));
+ buttons->SetAffirmativeButton(default_button);
- _film_changed_connection = locked_film->Changed.connect (boost::bind (&HintsDialog::film_changed, this));
- _film_content_changed_connection = locked_film->ContentChange.connect (boost::bind (&HintsDialog::film_content_change, this, _1));
+ _film_change_connection = locked_film->Change.connect (boost::bind (&HintsDialog::film_change, this, _1));
+ _film_content_change_connection = locked_film->ContentChange.connect (boost::bind (&HintsDialog::film_content_change, this, _1));
- _hints->Hint.connect (bind (&HintsDialog::hint, this, _1));
- _hints->Progress.connect (bind (&HintsDialog::progress, this, _1));
- _hints->Pulse.connect (bind (&HintsDialog::pulse, this));
- _hints->Finished.connect (bind (&HintsDialog::finished, this));
-
- film_changed ();
+ film_change (ChangeType::DONE);
+ _finished = false;
+
+ _hints.reset (new Hints (_film));
+ _hints_hint_connection = _hints->Hint.connect(bind(&HintsDialog::hint, this, _1));
+ _hints_progress_connection = _hints->Progress.connect(bind(&HintsDialog::progress, this, _1));
+ _hints_pulse_connection = _hints->Pulse.connect(bind(&HintsDialog::pulse, this));
+ _hints_finished_connection = _hints->Finished.connect(bind(&HintsDialog::finished, this));