-int MenuRunChktex(Buffer * buffer)
-{
- int ret;
-
- if (buffer->isSGML()) {
- Alert::alert(_("Chktex does not work with SGML derived documents."));
- return 0;
- } else
- ret = buffer->runChktex();
-
- if (ret >= 0) {
- string s;
- string t;
- if (ret == 0) {
- s = _("No warnings found.");
- } else if (ret == 1) {
- s = _("One warning found.");
- t = _("Use `Navigate->Error' to find it.");
- } else {
- s += tostr(ret);
- s += _(" warnings found.");
- t = _("Use `Navigate->Error' to find them.");
- }
- Alert::alert(_("Chktex run successfully"), s, t);
- } else {
- Alert::alert(_("Error!"), _("It seems chktex does not work."));
- }
- return ret;
-}
-
-
-void QuitLyX()
-{
- lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
-
- if (lyxrc.use_gui) {
- if (!bufferlist.quitWriteAll())
- return;
-
- lastfiles->writeFile(lyxrc.lastfiles);
- }
-
- // Set a flag that we do quitting from the program,
- // so no refreshes are necessary.
- quitting = true;
-
- // close buffers first
- bufferlist.closeAll();
-
- // do any other cleanup procedures now
- lyxerr[Debug::INFO] << "Deleting tmp dir " << system_tempdir << endl;
-
- DestroyLyXTmpDir(system_tempdir);
-
- lyx_gui::exit();
-}
-
-