#include "Language.h"
#include "Session.h"
#include "Color.h"
-#include "callback.h"
#include "LyXAction.h"
#include "LyXFunc.h"
#include "Lexer.h"
*/
bool use_gui = true;
+bool quitting; // flag, that we are quitting the program
namespace {
// we need to parse for "-dbg" and "-help"
easyParse(argc, argv);
- try { support::init_package(to_utf8(from_local8bit(argv[0])),
+ try {
+ support::init_package(to_utf8(from_local8bit(argv[0])),
cl_system_support, cl_user_support,
support::top_build_dir_is_one_level_up);
} catch (support::ExceptionMessage const & message) {
if (textclasslist.empty()) {
switch (Alert::prompt(
_("No textclass is found"),
- _("LyX can not continue because no textclass is found. "
+ _("LyX cannot continue because no textclass is found. "
"You can either reconfigure normally, or reconfigure using "
- "default text classes, or quit lyx."),
+ "default textclasses, or quit LyX."),
0, 2,
_("&Reconfigure"),
_("&Use Default"),
//...and the modules
moduleList.load();
- if (use_gui) {
- // Set the language defined by the user.
- //setGuiLanguage(lyxrc.gui_language);
+ // read keymap and ui files in batch mode as well
+ // because InsetInfo needs to know these to produce
+ // the correct output
- // Set up bindings
- pimpl_->toplevel_keymap_.reset(new KeyMap);
- defaultKeyBindings(pimpl_->toplevel_keymap_.get());
- pimpl_->toplevel_keymap_->read(lyxrc.bind_file);
+ // Set the language defined by the user.
+ //setGuiLanguage(lyxrc.gui_language);
- pimpl_->lyxfunc_.initKeySequences(pimpl_->toplevel_keymap_.get());
+ // Set up bindings
+ pimpl_->toplevel_keymap_.reset(new KeyMap);
+ defaultKeyBindings(pimpl_->toplevel_keymap_.get());
+ pimpl_->toplevel_keymap_->read(lyxrc.bind_file);
- // Read menus
- if (!readUIFile(lyxrc.ui_file))
- return false;
- }
+ pimpl_->lyxfunc_.initKeySequences(pimpl_->toplevel_keymap_.get());
+
+ // Read menus
+ if (!readUIFile(lyxrc.ui_file))
+ return false;
if (lyxerr.debugging(Debug::LYXRC))
lyxrc.print();
KeyMap & theTopLevelKeymap()
{
- BOOST_ASSERT(use_gui);
return LyX::ref().topLevelKeymap();
}