]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
do what the FIXME suggested
[lyx.git] / src / LyX.cpp
index 7bb6923ce9bd1c3f5136b3bcaae6ba38c28f6019..56cf176cf176148ee1839308e81b50711ef3c7dd 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "LyX.h"
 
+#include "BaseClassList.h"
 #include "Buffer.h"
 #include "BufferList.h"
 #include "CmdDef.h"
@@ -39,7 +40,6 @@
 #include "Server.h"
 #include "ServerSocket.h"
 #include "Session.h"
-#include "TextClassList.h"
 #include "ToolbarBackend.h"
 
 #include "frontends/alert.h"
@@ -83,8 +83,6 @@ namespace os = support::os;
 
 bool use_gui = true;
 
-bool quitting; // flag, that we are quitting the program
-
 namespace {
 
 // Filled with the command line arguments "foo" of "-sysdir foo" or
@@ -458,10 +456,6 @@ void LyX::prepareExit()
        cap::clearCutStack();
        cap::clearSelection();
 
-       // Set a flag that we do quitting from the program,
-       // so no refreshes are necessary.
-       quitting = true;
-
        // close buffers first
        pimpl_->buffer_list_.closeAll();
 
@@ -582,7 +576,7 @@ void LyX::execBatchCommands()
        // aknowledged.
 
        // if reconfiguration is needed.
-       while (textclasslist.empty()) {
+       while (BaseClassList::get().empty()) {
            switch (Alert::prompt(
                    _("No textclass is found"),
                    _("LyX cannot continue because no textclass is found. "
@@ -845,7 +839,7 @@ bool LyX::init()
        pimpl_->lyxfunc_.initKeySequences(&pimpl_->toplevel_keymap_);
 
        // Read menus
-       if (!readUIFile(lyxrc.ui_file))
+       if (use_gui && !readUIFile(lyxrc.ui_file))
                return false;
 
        if (lyxerr.debugging(Debug::LYXRC))