mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Messages::init(); needs Package. this fixes a crash on windows which presents parsing of the argument
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b391929ece
commit
97a5c0882d
@ -295,7 +295,6 @@ int LyX::exec(int & argc, char * argv[])
|
|||||||
} catch (ExceptionMessage const & message) {
|
} catch (ExceptionMessage const & message) {
|
||||||
LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_);
|
LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_);
|
||||||
}
|
}
|
||||||
// FIXME: This breaks out of source build under Windows.
|
|
||||||
locale_init();
|
locale_init();
|
||||||
|
|
||||||
// Here we need to parse the command line. At least
|
// Here we need to parse the command line. At least
|
||||||
|
@ -65,6 +65,12 @@ void init_package(string const & command_line_arg0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool packageInitialized()
|
||||||
|
{
|
||||||
|
return initialised_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Package const & package()
|
Package const & package()
|
||||||
{
|
{
|
||||||
LASSERT(initialised_, /**/);
|
LASSERT(initialised_, /**/);
|
||||||
|
@ -52,6 +52,8 @@ void init_package(std::string const & command_line_arg0,
|
|||||||
std::string const & command_line_user_support_dir,
|
std::string const & command_line_user_support_dir,
|
||||||
exe_build_dir_to_top_build_dir);
|
exe_build_dir_to_top_build_dir);
|
||||||
|
|
||||||
|
bool packageInitialized();
|
||||||
|
|
||||||
/** Accessor to the global data.
|
/** Accessor to the global data.
|
||||||
* Asserts that init_package() has been called first.
|
* Asserts that init_package() has been called first.
|
||||||
*/
|
*/
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "support/Messages.h"
|
#include "support/Messages.h"
|
||||||
|
#include "support/Package.h"
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
@ -37,7 +38,9 @@ void locale_init()
|
|||||||
setlocale(LC_MESSAGES, "");
|
setlocale(LC_MESSAGES, "");
|
||||||
# endif
|
# endif
|
||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
|
if (support::packageInitialized()) {
|
||||||
Messages::init();
|
Messages::init();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user