Double fallback implemented (see #4396)

If the user's default profile is not found, it'll fallback to the
bundled one. If this one is not found, it'll fall back to internal
values. No restart required. Only the GUI alert are localized.
This commit is contained in:
Hombre
2018-02-24 14:02:50 +01:00
parent ff021826c6
commit b430ca19a6
6 changed files with 149 additions and 62 deletions

View File

@@ -349,15 +349,28 @@ void RTWindow::showErrors()
{
// alerting users if the default raw and image profiles are missing
if (options.is_defProfRawMissing()) {
options.defProfRaw = DEFPROFILE_RAW;
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_bundledDefProfRawMissing()) {
Gtk::MessageDialog msgd (*this, Glib::ustring::compose (M ("OPTIONS_BUNDLED_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
options.defProfRaw = DEFPROFILE_INTERNAL;
}
if (options.is_defProfImgMissing()) {
options.defProfImg = DEFPROFILE_IMG;
Gtk::MessageDialog msgd (*this, Glib::ustring::compose (M ("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
}
if (options.is_bundledDefProfImgMissing()) {
Gtk::MessageDialog msgd (*this, Glib::ustring::compose (M ("OPTIONS_BUNDLED_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
options.defProfImg = DEFPROFILE_INTERNAL;
}
}
bool RTWindow::on_configure_event (GdkEventConfigure* event)
{
if (!is_maximized() && is_visible()) {