Fix #4396: "5.4-RC1 stuck on release notes panel"

Now the alert windows pops after closing the splash window
This commit is contained in:
Hombre
2018-02-18 01:13:49 +01:00
parent fc751a0cce
commit cb0798502b
4 changed files with 22 additions and 11 deletions

View File

@@ -321,6 +321,7 @@ void RTWindow::on_realize ()
vMajor.emplace_back(v, 0, v.find_first_not_of("0123456789."));
}
bool waitForSplash = false;
if (vMajor.size() == 2 && vMajor[0] != vMajor[1]) {
// Update the version parameter with the right value
options.version = versionString;
@@ -330,6 +331,7 @@ void RTWindow::on_realize ()
splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) );
if (splash->hasReleaseNotes()) {
waitForSplash = true;
splash->showReleaseNotes();
splash->show ();
} else {
@@ -337,8 +339,25 @@ void RTWindow::on_realize ()
splash = nullptr;
}
}
if (!waitForSplash) {
showErrors();
}
}
void RTWindow::showErrors()
{
// alerting users if the default raw and image profiles are missing
if (options.is_defProfRawMissing()) {
Gtk::MessageDialog msgd (*this, Glib::ustring::compose (M ("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
}
if (options.is_defProfImgMissing()) {
Gtk::MessageDialog msgd (*this, Glib::ustring::compose (M ("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
}
}
bool RTWindow::on_configure_event (GdkEventConfigure* event)
{
if (!is_maximized() && is_visible()) {
@@ -875,6 +894,7 @@ bool RTWindow::splashClosed (GdkEventAny* event)
{
delete splash;
splash = nullptr;
showErrors();
return true;
}