* Licence details can be found in the file COPYING.
*
* \author Alfredo Braunstein
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
* \author Jean-Marc Lasgouttes
* \author John Levon
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include "LyX.h"
-#include "LayoutFile.h"
+#include "ASpell_local.h"
#include "Buffer.h"
#include "BufferList.h"
#include "CmdDef.h"
-#include "Color.h"
+#include "ColorSet.h"
#include "ConverterCache.h"
#include "Converter.h"
#include "CutAndPaste.h"
#include "FuncStatus.h"
#include "KeyMap.h"
#include "Language.h"
+#include "LayoutFile.h"
#include "Lexer.h"
#include "LyXAction.h"
#include "LyXFunc.h"
// The language used will be derived from the environment
// variables.
messages_["GUI"] = Messages();
+
+#if defined(USE_ASPELL)
+ spell_checker_ = new ASpell();
+#else
+ spell_checker_ = 0;
+#endif
+ }
+
+ ~Impl()
+ {
+ delete spell_checker_;
}
+
/// our function handler
LyXFunc lyxfunc_;
///
///
graphics::Previews preview_;
+ ///
+ SpellChecker * spell_checker_;
};
///
if (lyxrc.gui_language == "auto")
return;
Language const * language = languages.getLanguage(lyxrc.gui_language);
- if (!language)
- // Not possible at this point.
- return;
- LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << language->code());
- if (!setEnv("LANGUAGE", language->code()))
- LYXERR(Debug::LOCALE, "\t... failed!");
+ if (language) {
+ LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << language->code());
+ if (!setEnv("LANGUAGE", language->code()))
+ LYXERR(Debug::LOCALE, "\t... failed!");
+ }
LYXERR(Debug::LOCALE, "Setting LC_ALL to en_US");
if (!setEnv("LC_ALL", "en_US"))
LYXERR(Debug::LOCALE, "\t... failed!");
+ Messages::init();
singleton_->pimpl_->messages_["GUI"] = Messages();
}
vector<string>::const_iterator bcit = pimpl_->batch_commands.begin();
vector<string>::const_iterator bcend = pimpl_->batch_commands.end();
for (; bcit != bcend; bcit++) {
+ LYXERR(Debug::ACTION, "Buffer::dispatch: cmd: " << *bcit);
buf->dispatch(*bcit, &success);
final_success |= success;
}
}
// clear this list to save a few bytes of RAM
pimpl_->files_to_load_.clear();
- }
- else
+ } else
pimpl_->application_->restoreGuiSession();
// Execute batch commands if available
Windows handles SIGFPE and SIGSEGV signals as expected.
-Cntl+C interrupts (mapped to SIGINT by Windows' POSIX compatability layer)
+Ctrl+C interrupts (mapped to SIGINT by Windows' POSIX compatability layer)
cause a new thread to be spawned. This may well result in unexpected
behaviour by the single-threaded LyX.
if (!LyXSetStyle())
return false;
//...and the modules
- moduleList.load();
+ moduleList.read();
// read keymap and ui files in batch mode as well
// because InsetInfo needs to know these to produce
" where fmt is the export format of choice.\n"
" Look on Tools->Preferences->File formats->Format\n"
" to get an idea which parameters should be passed.\n"
+ " Note that the order of -e and -x switches matters."
"\t-i [--import] fmt file.xxx\n"
" where fmt is the import format of choice\n"
" and file.xxx is the file to be imported.\n"
int parse_geometry(string const & arg1, string const &, string &)
{
geometryArg = arg1;
-#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING))
- // remove also the arg
- return 1;
-#else
- // don't remove "-geometry"
+ // don't remove "-geometry", it will be pruned out later in the
+ // frontend if need be.
return -1;
-#endif
}
return singleton_->pimpl_->toplevel_cmddef_;
}
+
+SpellChecker * theSpellChecker()
+{
+ return singleton_->pimpl_->spell_checker_;
+}
+
} // namespace lyx