]> git.lyx.org Git - features.git/commitdiff
One final bit of cleanup.
authorRichard Heck <rgheck@comcast.net>
Wed, 7 Apr 2010 12:50:47 +0000 (12:50 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 7 Apr 2010 12:50:47 +0000 (12:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34075 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h

index cc4972017e596c8b8d4c9c496b3d95af9d8ff09a..a5b2797a084648c1fbbf20fe0dd983ed22fbb175 100644 (file)
@@ -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 ----------------------------
index b170430f4a9234e3b77bed37f0e52abd1da3cfac..10d0c79b25fea07fbf2692cb9621a71c01938133 100644 (file)
@@ -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