summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-05-03 20:04:39 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-06 21:30:22 +0100
commit9b2545bf5fd8fafd4108478519d9ae1f2f5b945f (patch)
treebde67b952225eb2caf147e261e8dd926f9f1f3af
parent9bc34d90141cb3eb702094eb40268d8c1111d2a5 (diff)
Close splash before displaying config errors/warnings.
-rw-r--r--src/tools/dcpomatic.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 7cac8e7f0..73e215c04 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -1511,10 +1511,7 @@ private:
_frame = new DOMFrame (_("DCP-o-matic"));
SetTopWindow (_frame);
_frame->Maximize ();
- if (_splash) {
- _splash->Destroy ();
- _splash = 0;
- }
+ close_splash ();
if (!Config::instance()->nagged(Config::NAG_INITIAL_SETUP)) {
InitialSetupDialog* d = new InitialSetupDialog ();
@@ -1650,13 +1647,23 @@ private:
}
}
+ void close_splash ()
+ {
+ if (_splash) {
+ _splash->Destroy ();
+ _splash = 0;
+ }
+ }
+
void config_failed_to_load ()
{
+ close_splash ();
message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create."));
}
void config_warning (string m)
{
+ close_splash ();
message_dialog (_frame, std_to_wx (m));
}