void setRcGuiLanguage()
{
- LASSERT(singleton_, "");
+ LASSERT(singleton_, /**/);
if (lyxrc.gui_language == "auto")
return;
Language const * language = languages.getLanguage(lyxrc.gui_language);
- 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();
}
prepareExit();
return exit_status;
}
-
+
// FIXME
/* Create a CoreApplication class that will provide the main event loop
* and the socket callback registering. With Qt4, only QtCore
}
// 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.
// Read lyxrc.dist again to be able to override viewer auto-detection.
readRcFile("lyxrc.dist");
+ // Set again the language defined by the distributor.
+ setRcGuiLanguage();
+
system_lyxrc = lyxrc;
system_formats = formats;
pimpl_->system_converters_ = pimpl_->converters_;
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
}