]> git.lyx.org Git - features.git/commitdiff
Fix problem noted by Vincent.
authorRichard Heck <rgheck@comcast.net>
Fri, 17 Jul 2009 21:36:34 +0000 (21:36 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 17 Jul 2009 21:36:34 +0000 (21:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30652 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp

index b313dde3d2c4c349afa27b7b3718192d4620aeaa..35b71bef7eb28d76cb9760aa1e4521967c65695b 100644 (file)
@@ -1493,26 +1493,25 @@ bool GuiApplication::readUIFile(QString const & name, bool include)
                LYXERR(Debug::INIT, "Could not find " << name);
                if (include) {
                        Alert::warning(_("Could not find UI definition file"),
-                               bformat(_("Error while reading the included file\n\%1$s.\n"
+                               bformat(_("Error while reading the included file\n%1$s\n"
                                        "Please check your installation."), qstring_to_ucs4(name)));
                        return false;
                }
-               Alert::warning(_("Could not find UI definition file"),
-                       bformat(_("Error while reading the configuration file\n%1$s.\n"
-                               "Falling back to default.\n"
-                               "Please look under Tools>Preferences>User Interface and\n"
-                               "check which User Interface file you are using."), qstring_to_ucs4(name)));
-               ui_path = libFileSearch("ui", "default", "ui");
-               if (ui_path.empty()) {
+               if (name == "default") {
                        LYXERR(Debug::INIT, "Could not find default UI file!!");
                        Alert::warning(_("Could not find default UI file"),
                                _("LyX could not find the default UI file!\n"
-                                       "Please check your installation."));
+                                 "Please check your installation."));
                        return false;
                }
+               Alert::warning(_("Could not find UI definition file"),
+               bformat(_("Error while reading the configuration file\n%1$s\n"
+                       "Falling back to default.\n"
+                       "Please look under Tools>Preferences>User Interface and\n"
+                       "check which User Interface file you are using."), qstring_to_ucs4(name)));
+               return readUIFile("default", false);
        }
 
-
        // Ensure that a file is read only once (prevents include loops)
        static QStringList uifiles;
        QString const uifile = toqstr(ui_path.absFilename());