]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
This commit saves the need to check for lyx::use_gui in a number of places.
[lyx.git] / src / lyx_cb.C
index 0735a98f9803445709a99213e7183de6c1dd99e8..d849b4b380746a9700d1b02e786501807e1e63bf 100644 (file)
@@ -34,7 +34,6 @@
 #include "frontends/Alert.h"
 #include "frontends/Application.h"
 #include "frontends/FileDialog.h"
-#include "frontends/lyx_gui.h"
 
 #include "support/filefilterlist.h"
 #include "support/filetools.h"
@@ -94,7 +93,6 @@ using std::istream_iterator;
 // this should be static, but I need it in buffer.C
 bool quitting; // flag, that we are quitting the program
 
-
 //
 // Menu callbacks
 //
@@ -192,7 +190,7 @@ void quitLyX(bool noask)
 {
        lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
 
-       if (lyx_gui::use_gui) {
+       if (lyx::use_gui) {
                if (!noask && !theBufferList().quitWriteAll())
                        return;
 
@@ -216,11 +214,12 @@ void quitLyX(bool noask)
                Alert::warning(_("Unable to remove temporary directory"), msg);
        }
 
-       if (lyx_gui::use_gui)
+       if (lyx::use_gui) {
                theApp->exit(0);
 
-       // Restore original font resources after Application is destroyed.
-       lyx::support::restoreFontResources();
+               // Restore original font resources after Application is destroyed.
+               lyx::support::restoreFontResources();
+       }
 }