X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_player.cc;h=1808e86fe4d3da7fb450b12c2a7ec0a74166627c;hb=963c7649da903b87637975e8c2d634da887d3109;hp=600d1c6b440531aaddfff8df315374283d834054;hpb=4e4968464eeef1956cb82392e1fc3b27a792ab89;p=dcpomatic.git diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 600d1c6b4..1808e86fe 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -898,16 +898,14 @@ private: DCPOMATIC_ASSERT (dcp); auto job = make_shared(dcp->directories()); - auto progress = new VerifyDCPProgressDialog(this, _("DCP-o-matic Player")); + auto progress = make_wx(this, _("DCP-o-matic Player")); bool const completed = progress->run (job); - progress->Destroy (); if (!completed) { return; } - auto d = new VerifyDCPDialog (this, job); + auto d = make_wx(this, job); d->ShowModal (); - d->Destroy (); } void tools_check_for_updates () @@ -918,9 +916,8 @@ private: void tools_timing () { - auto d = new TimerDisplay(this, _viewer.state_timer(), _viewer.gets()); + auto d = make_wx(this, _viewer.state_timer(), _viewer.gets()); d->ShowModal (); - d->Destroy (); } void tools_system_information () @@ -934,18 +931,16 @@ private: void help_about () { - auto d = new AboutDialog (this); + auto d = make_wx(this); d->ShowModal (); - d->Destroy (); } void help_report_a_problem () { - auto d = new ReportProblemDialog (this); + auto d = make_wx(this); if (d->ShowModal () == wxID_OK) { d->report (); } - d->Destroy (); } void update_checker_state_changed () @@ -964,9 +959,8 @@ private: } if (uc->state() == UpdateChecker::State::YES) { - auto dialog = new UpdateDialog (this, uc->stable (), uc->test ()); + auto dialog = make_wx(this, uc->stable (), uc->test ()); dialog->ShowModal (); - dialog->Destroy (); } else if (uc->state() == UpdateChecker::State::FAILED) { error_dialog (this, _("The DCP-o-matic download server could not be contacted.")); } else { @@ -1168,7 +1162,7 @@ private: bool OnInit () override { - wxSplashScreen* splash = nullptr; + wx_ptr splash; try { wxInitAllImageHandlers ();