On 07/17/2009 02:11 PM, Vincent van Ravesteijn wrote:
Vincent van Ravesteijn schreef:
An error message you do not want to get (from some highly
sophisticated piece of software) :
Whoops. If the attached looks OK, please commit.
By the way, did you do this as a check, or are you actually missing
default.ui for some reason?
rh
Index: src/frontends/qt4/GuiApplication.cpp
===================================================================
--- src/frontends/qt4/GuiApplication.cpp (revision 30651)
+++ src/frontends/qt4/GuiApplication.cpp (working copy)
@@ -1471,13 +1471,6 @@
ui_last
};
- LexerKeyword uitags[] = {
- { "include", ui_include },
- { "menuset", ui_menuset },
- { "toolbars", ui_toolbars },
- { "toolbarset", ui_toolbarset }
- };
-
LYXERR(Debug::INIT, "About to read " << name << "...");
FileName ui_path;
@@ -1493,25 +1486,31 @@
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);
}
+ LexerKeyword uitags[] = {
+ { "include", ui_include },
+ { "menuset", ui_menuset },
+ { "toolbars", ui_toolbars },
+ { "toolbarset", ui_toolbarset }
+ };
// Ensure that a file is read only once (prevents include loops)
static QStringList uifiles;