From fd8c379545d196584a6b384dee9a14eeca39ab3c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 16 Jul 2009 22:24:39 +0000 Subject: [PATCH] Fix bug #6076. As said there, other configuration files probably need to be checked. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30636 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index f37e5b9835..2841491b2d 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1491,10 +1491,25 @@ bool GuiApplication::readUIFile(QString const & name, bool include) if (ui_path.empty()) { 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" + "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" - "Please check your installation."), qstring_to_ucs4(name))); - return false; + 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()) { + LYXERR(Debug::INIT, "Could not find default UI file!!"); + Alert::warning(_("Could not find default UI file"), + _("LyX coudl not find the default UI file!\n" + "Please check your installation.")); + return false; + } } -- 2.39.2