One final bit of cleanup.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34075 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-04-07 12:50:47 +00:00
parent 37889247df
commit b3ae6c671f
2 changed files with 8 additions and 8 deletions

View 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 ----------------------------

View 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