From b3ae6c671f67ea32062d09587816f89481f45093 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 7 Apr 2010 12:50:47 +0000 Subject: [PATCH] One final bit of cleanup. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34075 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 14 ++++++-------- src/frontends/qt4/GuiApplication.h | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index cc4972017e..a5b2797a08 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1160,11 +1160,11 @@ void GuiApplication::gotoBookmark(unsigned int idx, bool openFile, bool switchTo // This function runs "configure" and then rereads lyx.defaults to // reconfigure the automatic settings. -static void reconfigure(GuiView * lv, string const & option) +void GuiApplication::reconfigure(string const & option) { // emit message signal. - if (lv) - lv->message(_("Running configure...")); + if (current_view_) + current_view_->message(_("Running configure...")); // Run configure in user lyx directory PathChanger p(package().user_support()); @@ -1174,8 +1174,8 @@ static void reconfigure(GuiView * lv, string const & option) int ret = one.startscript(Systemcall::Wait, configure_command); p.pop(); // emit message signal. - if (lv) - lv->message(_("Reloading configuration...")); + if (current_view_) + current_view_->message(_("Reloading configuration...")); lyxrc.read(libFileSearch(QString(), "lyxrc.defaults")); // Re-read packages.lst LaTeXFeatures::getAvailable(); @@ -1187,7 +1187,6 @@ static void reconfigure(GuiView * lv, string const & option) "not be able to work properly.\n" "Please reconfigure again if needed.")); else - Alert::information(_("System reconfigured"), _("The system has been reconfigured.\n" "You need to restart LyX to make use of any\n" @@ -1195,7 +1194,6 @@ static void reconfigure(GuiView * lv, string const & option) } - void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) { string const argument = to_utf8(cmd.argument()); @@ -1413,7 +1411,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) // --- Menus ----------------------------------------------- case LFUN_RECONFIGURE: // argument is any additional parameter to the configure.py command - reconfigure(currentView(), to_utf8(cmd.argument())); + reconfigure(to_utf8(cmd.argument())); break; // --- lyxserver commands ---------------------------- diff --git a/src/frontends/qt4/GuiApplication.h b/src/frontends/qt4/GuiApplication.h index b170430f4a..10d0c79b25 100644 --- a/src/frontends/qt4/GuiApplication.h +++ b/src/frontends/qt4/GuiApplication.h @@ -160,6 +160,8 @@ private: bool readUIFile(QString const & name, bool include = false); /// void setGuiLanguage(); + /// + void reconfigure(std::string const & option); /// This GuiView is the one receiving Clipboard and Selection /// events -- 2.39.2