diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-08-11 01:36:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-08-11 19:39:04 +0100 |
| commit | b75b2a81c24716e21442178b77ee0276ddff843c (patch) | |
| tree | 3e090cb6b27eba4afc113fc211c6efdb0cfbcc1b /src/tools | |
| parent | a983627b357e25478a524a20cafa4a68a4b9299f (diff) | |
Show a splash screen if config needs creating.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index cc85da0ef..743172e9b 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -35,6 +35,7 @@ #include "lib/send_kdm_email_job.h" #include "lib/server_finder.h" #include "lib/update.h" +#include "lib/cross.h" #include "lib/content_factory.h" #include "wx/film_viewer.h" #include "wx/film_editor.h" @@ -55,6 +56,7 @@ #include <wx/stdpaths.h> #include <wx/cmdline.h> #include <wx/preferences.h> +#include <wx/splash.h> #ifdef __WXMSW__ #include <shellapi.h> #endif @@ -776,6 +778,18 @@ private: bool OnInit () try { + wxInitAllImageHandlers (); + + wxSplashScreen* splash = 0; + if (!Config::have_existing ()) { + wxBitmap bitmap; + boost::filesystem::path p = shared_path () / "splash.png"; + if (bitmap.LoadFile (std_to_wx (p.string ()), wxBITMAP_TYPE_PNG)) { + splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1); + wxYield (); + } + } + SetAppName (_("DCP-o-matic")); if (!wxApp::OnInit()) { @@ -792,8 +806,6 @@ private: TransformProcessType (&serial, kProcessTransformToForegroundApplication); #endif - wxInitAllImageHandlers (); - dcpomatic_setup_path_encoding (); /* Enable i18n; this will create a Config object @@ -817,6 +829,9 @@ private: _frame = new DOMFrame (_("DCP-o-matic")); SetTopWindow (_frame); _frame->Maximize (); + if (splash) { + splash->Destroy (); + } _frame->Show (); if (!_film_to_load.empty() && boost::filesystem::is_directory (_film_to_load)) { |
