diff --git a/rtgui/main.cc b/rtgui/main.cc index 5c2296b58..2ae442e5a 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -347,17 +347,6 @@ RTWindow *create_rt_window() //gdk_threads_enter (); RTWindow *rtWindow = new RTWindow(); - // alerting users if the default raw and image profiles are missing - if (options.is_defProfRawMissing()) { - Gtk::MessageDialog msgd (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 (Glib::ustring::compose (M ("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - msgd.run (); - } - return rtWindow; } diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 80e481315..afc95efd0 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -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; } diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 9c1699bcf..e9fe51b1d 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -59,6 +59,7 @@ private: bool splashClosed (GdkEventAny* event); bool isEditorPanel (Widget* panel); bool isEditorPanel (guint pageNum); + void showErrors (); Glib::ustring versionStr; #if defined(__APPLE__) diff --git a/rtgui/splash.cc b/rtgui/splash.cc index 9e0cc2015..b95071d0b 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -281,4 +281,5 @@ void Splash::showReleaseNotes() void Splash::closePressed() { hide(); + close(); }