#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"
// this should be static, but I need it in buffer.C
bool quitting; // flag, that we are quitting the program
-
//
// Menu callbacks
//
{
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
- if (lyx_gui::use_gui) {
- if (!noask && !theApp->bufferList().quitWriteAll())
+ if (lyx::use_gui) {
+ if (!noask && !theBufferList().quitWriteAll())
return;
LyX::cref().session().writeFile();
quitting = true;
// close buffers first
- theApp->bufferList().closeAll();
+ theBufferList().closeAll();
// do any other cleanup procedures now
lyxerr[Debug::INFO] << "Deleting tmp dir " << package().temp_dir() << endl;
Alert::warning(_("Unable to remove temporary directory"), msg);
}
- theApp->exit(0);
- // Restore original font resources after Application is destroyed.
- lyx::support::restoreFontResources();
+ if (lyx::use_gui) {
+ theApp->exit(0);
+
+ // Restore original font resources after Application is destroyed.
+ lyx::support::restoreFontResources();
+ }
}