Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30727/src/gui
Modified Files:
wxMApp.cpp
Log Message:
don't use wxLOCALE_CONV_ENCODING flag when initializing the locale
Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.304
retrieving revision 1.305
diff -b -u -2 -r1.304 -r1.305
--- wxMApp.cpp 13 Feb 2006 01:16:54 -0000 1.304
+++ wxMApp.cpp 19 Apr 2006 00:55:04 -0000 1.305
@@ -973,8 +973,9 @@
wxLogNull noLog;
+ int lang;
if ( locale.empty() )
{
// use the default system language
- int lang = wxLocale::GetSystemLanguage();
+ lang = wxLocale::GetSystemLanguage();
switch ( lang )
{
@@ -997,4 +998,5 @@
// nothing to do -- we don't have to translate the messages from
// English to English
+ lang = wxLANGUAGE_DEFAULT;
break;
@@ -1010,20 +1012,24 @@
locale.Printf(_("unknown language (%d)"), lang);
- m_Locale = new wxLocale(lang);
+ m_Locale = new wxLocale(lang, wxLOCALE_LOAD_DEFAULT);
}
}
else // the user specified a locale
{
-#if wxCHECK_VERSION(2, 5, 0)
const wxLanguageInfo *info = wxLocale::FindLanguageInfo(locale);
- if ( info )
+ lang = info ? info->Language : wxLANGUAGE_UNKNOWN;
+ }
+
+ if ( lang != wxLANGUAGE_DEFAULT )
{
- m_Locale = new wxLocale(info->Language);
+ if ( lang != wxLANGUAGE_UNKNOWN )
+ {
+ m_Locale = new wxLocale(lang, wxLOCALE_LOAD_DEFAULT);
}
- else // use the same string for locale and the message catalog
+ else if ( !locale.empty() )
+ {
+ // use the same string for locale and the message catalog
// locations -- this only really works under Unix but we
// can't do much better without FindLanguageInfo()
-#endif // 2.5.0+
- {
m_Locale = new wxLocale(locale, locale);
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates