X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_player.cc;h=d4e247d62bb701be3ed8fffef1fd248ed425abb1;hb=0c56d4be9f49592eabec832381608ba75b453df4;hp=9fab8b5887932afa38e2acb56531567a7bdee1d8;hpb=64bd18216738052c150770561f8f78e13ca792b8;p=dcpomatic.git diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 9fab8b588..d4e247d62 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -32,6 +32,7 @@ #include "wx/timer_display.h" #include "wx/system_information_dialog.h" #include "wx/player_stress_tester.h" +#include "wx/verify_dcp_progress_dialog.h" #include "lib/cross.h" #include "lib/config.h" #include "lib/util.h" @@ -787,18 +788,15 @@ private: shared_ptr dcp = boost::dynamic_pointer_cast(_film->content().front()); DCPOMATIC_ASSERT (dcp); - JobManager* jm = JobManager::instance (); - jm->add (shared_ptr (new VerifyDCPJob (dcp->directories()))); - bool const ok = display_progress (_("DCP-o-matic Player"), _("Verifying DCP")); - if (!ok) { + shared_ptr job (new VerifyDCPJob(dcp->directories())); + VerifyDCPProgressDialog* progress = new VerifyDCPProgressDialog(this, _("DCP-o-matic Player")); + bool const completed = progress->run (job); + progress->Destroy (); + if (!completed) { return; } - DCPOMATIC_ASSERT (!jm->get().empty()); - shared_ptr last = dynamic_pointer_cast (jm->get().back()); - DCPOMATIC_ASSERT (last); - - VerifyDCPDialog* d = new VerifyDCPDialog (this, last); + VerifyDCPDialog* d = new VerifyDCPDialog (this, job); d->ShowModal (); d->Destroy (); }