]> git.lyx.org Git - features.git/blobdiff - src/lyx_cb.C
This commits cuts down LyX::exec2 into two new methods (execBatchCommands() and resto...
[features.git] / src / lyx_cb.C
index d849b4b380746a9700d1b02e786501807e1e63bf..74b7800967252c9aae091ef29c7eaf91a4e6e3aa 100644 (file)
@@ -58,7 +58,6 @@
 using lyx::docstring;
 using lyx::support::addName;
 using lyx::support::bformat;
-using lyx::support::destroyDir;
 using lyx::support::FileFilterList;
 using lyx::support::ForkedProcess;
 using lyx::support::isLyXFilename;
@@ -186,43 +185,6 @@ bool writeAs(Buffer * buffer, string const & filename)
 }
 
 
-void quitLyX(bool noask)
-{
-       lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
-
-       if (lyx::use_gui) {
-               if (!noask && !theBufferList().quitWriteAll())
-                       return;
-
-               LyX::cref().session().writeFile();
-       }
-
-       // Set a flag that we do quitting from the program,
-       // so no refreshes are necessary.
-       quitting = true;
-
-       // close buffers first
-       theBufferList().closeAll();
-
-       // do any other cleanup procedures now
-       lyxerr[Debug::INFO] << "Deleting tmp dir " << package().temp_dir() << endl;
-
-       if (!destroyDir(package().temp_dir())) {
-               docstring const msg =
-                       bformat(_("Unable to remove the temporary directory %1$s"),
-                       lyx::from_utf8(package().temp_dir()));
-               Alert::warning(_("Unable to remove temporary directory"), msg);
-       }
-
-       if (lyx::use_gui) {
-               theApp->exit(0);
-
-               // Restore original font resources after Application is destroyed.
-               lyx::support::restoreFontResources();
-       }
-}
-
-
 namespace {
 
 class AutoSaveBuffer : public ForkedProcess {