#include "paragraph.h"
#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"
+#include "support/fontutils.h"
#include "support/forkedcall.h"
#include "support/fs_extras.h"
#include "support/lyxlib.h"
using std::istream_iterator;
-extern BufferList bufferlist;
// this should be static, but I need it in buffer.C
bool quitting; // flag, that we are quitting the program
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
if (lyx_gui::use_gui) {
- if (!noask && !bufferlist.quitWriteAll())
+ if (!noask && !theApp->bufferList().quitWriteAll())
return;
LyX::cref().session().writeFile();
quitting = true;
// close buffers first
- bufferlist.closeAll();
+ theApp->bufferList().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);
}
- lyx_gui::exit(0);
+ theApp->exit(0);
+ // Restore original font resources after Application is destroyed.
+ lyx::support::restoreFontResources();
}