]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
PDFOptions.cpp: set all string containing options to \hypersetup
[lyx.git] / src / LyXFunc.cpp
index c6dd2ed9e6f4eb437c1900b3da72a1fffe36f56c..40186817792b6d9debfd0e4275e0765295e881ef 100644 (file)
@@ -148,6 +148,33 @@ namespace Alert = frontend::Alert;
 
 namespace {
 
+// This function runs "configure" and then rereads lyx.defaults to
+// reconfigure the automatic settings.
+void reconfigure(LyXView & lv, string const & option)
+{
+       // emit message signal.
+       lv.message(_("Running configure..."));
+
+       // Run configure in user lyx directory
+       support::Path p(package().user_support());
+       string configure_command = package().configure_command();
+       configure_command += option;
+       Systemcall one;
+       one.startscript(Systemcall::Wait, configure_command);
+       p.pop();
+       // emit message signal.
+       lv.message(_("Reloading configuration..."));
+       lyxrc.read(support::libFileSearch(string(), "lyxrc.defaults"));
+       // Re-read packages.lst
+       LaTeXFeatures::getAvailable();
+
+       Alert::information(_("System reconfigured"),
+                          _("The system has been reconfigured.\n"
+                            "You need to restart LyX to make use of any\n"
+                            "updated document class specifications."));
+}
+
+
 bool getLocalStatus(Cursor cursor, FuncRequest const & cmd, FuncStatus & status)
 {
        // Try to fix cursor in case it is broken.