X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_player.cc;h=cbb58e9458a7d7a44707f53c5e105ab480517a36;hb=a55c91029957726a7a56cbd3997b68bce4071e9f;hp=1808e86fe4d3da7fb450b12c2a7ec0a74166627c;hpb=963c7649da903b87637975e8c2d634da887d3109;p=dcpomatic.git diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 1808e86fe..cbb58e945 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -47,6 +47,7 @@ #include "lib/ffmpeg_content.h" #include "lib/file_log.h" #include "lib/film.h" +#include "lib/font_config.h" #include "lib/image.h" #include "lib/image_jpeg.h" #include "lib/image_png.h" @@ -244,6 +245,8 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_timing, this), ID_tools_timing); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_system_information, this), ID_tools_system_information); + Bind(wxEVT_CLOSE_WINDOW, boost::bind(&DOMFrame::close, this, _1)); + if (Config::instance()->player_mode() == Config::PLAYER_MODE_DUAL) { auto pc = new PlaylistControls (_overall_panel, _viewer); _controls = pc; @@ -313,6 +316,12 @@ public: _viewer.stop(); } + void close(wxCloseEvent& ev) + { + FontConfig::drop(); + ev.Skip(); + } + void setup_main_sizer (Config::PlayerMode mode) { _main_sizer->Detach(_viewer.panel()); @@ -711,7 +720,7 @@ private: void file_save_frame () { - wxFileDialog dialog (this, _("Save frame to file"), "", "", "PNG files (*.png)|*.png|JPEG files (*.jpg,*.jpeg)|*.jpg,*.jpeg", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + wxFileDialog dialog (this, _("Save frame to file"), "", "", "PNG files (*.png)|*.png|JPEG files (*.jpg;*.jpeg)|*.jpg;*.jpeg", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if (dialog.ShowModal() == wxID_CANCEL) { return; } @@ -898,14 +907,14 @@ private: DCPOMATIC_ASSERT (dcp); auto job = make_shared(dcp->directories()); - auto progress = make_wx(this, _("DCP-o-matic Player")); - bool const completed = progress->run (job); - if (!completed) { - return; - } + VerifyDCPProgressDialog progress(this, _("DCP-o-matic Player")); + bool const completed = progress.run(job); + progress.Close(); - auto d = make_wx(this, job); - d->ShowModal (); + if (completed) { + VerifyDCPDialog dialog(this, job); + dialog.ShowModal(); + } } void tools_check_for_updates () @@ -1162,7 +1171,7 @@ private: bool OnInit () override { - wx_ptr splash; + wxSplashScreen* splash; try { wxInitAllImageHandlers ();