Add wxLOCALE_DONT_LOAD_DEFAULT (=0) for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -408,8 +408,9 @@ enum wxLocaleInfo
|
|||||||
|
|
||||||
enum wxLocaleInitFlags
|
enum wxLocaleInitFlags
|
||||||
{
|
{
|
||||||
wxLOCALE_LOAD_DEFAULT = 0x0001, // load wxwin.mo?
|
wxLOCALE_DONT_LOAD_DEFAULT = 0x0000, // don't load wxwin.mo
|
||||||
wxLOCALE_CONV_ENCODING = 0x0002 // convert encoding on the fly?
|
wxLOCALE_LOAD_DEFAULT = 0x0001, // load wxwin.mo?
|
||||||
|
wxLOCALE_CONV_ENCODING = 0x0002 // convert encoding on the fly?
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxLocale
|
class WXDLLIMPEXP_BASE wxLocale
|
||||||
|
@@ -762,6 +762,7 @@ public:
|
|||||||
- wxLOCALE_LOAD_DEFAULT: Load the message catalog for the given locale
|
- wxLOCALE_LOAD_DEFAULT: Load the message catalog for the given locale
|
||||||
containing the translations of standard wxWidgets messages
|
containing the translations of standard wxWidgets messages
|
||||||
automatically.
|
automatically.
|
||||||
|
- wxLOCALE_DONT_LOAD_DEFAULT: Negation of wxLOCALE_LOAD_DEFAULT.
|
||||||
- wxLOCALE_CONV_ENCODING: Automatically convert message catalogs to
|
- wxLOCALE_CONV_ENCODING: Automatically convert message catalogs to
|
||||||
platform's default encoding. Note that it will do only basic
|
platform's default encoding. Note that it will do only basic
|
||||||
conversion between well-known pair like iso8859-1 and windows-1252 or
|
conversion between well-known pair like iso8859-1 and windows-1252 or
|
||||||
|
@@ -229,7 +229,7 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
// don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
|
// don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
|
||||||
// false just because it failed to load wxstd catalog
|
// false just because it failed to load wxstd catalog
|
||||||
if ( !m_locale.Init(m_lang, wxLOCALE_CONV_ENCODING) )
|
if ( !m_locale.Init(m_lang, wxLOCALE_DONT_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) )
|
||||||
{
|
{
|
||||||
wxLogWarning(_("This language is not supported by the system."));
|
wxLogWarning(_("This language is not supported by the system."));
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ void IntlTestCase::setUp()
|
|||||||
CPPUNIT_ASSERT( m_locale );
|
CPPUNIT_ASSERT( m_locale );
|
||||||
|
|
||||||
// don't load default catalog, it may be unavailable:
|
// don't load default catalog, it may be unavailable:
|
||||||
bool loaded = m_locale->Init(wxLANGUAGE_FRENCH, wxLOCALE_CONV_ENCODING);
|
bool loaded = m_locale->Init(wxLANGUAGE_FRENCH, wxLOCALE_DONT_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||||
CPPUNIT_ASSERT( loaded );
|
CPPUNIT_ASSERT( loaded );
|
||||||
|
|
||||||
m_locale->AddCatalog("internat");
|
m_locale->AddCatalog("internat");
|
||||||
|
@@ -720,7 +720,7 @@ void StringTestCase::ToDouble()
|
|||||||
wxLocale *locale = new wxLocale;
|
wxLocale *locale = new wxLocale;
|
||||||
|
|
||||||
// don't load default catalog, it may be unavailable:
|
// don't load default catalog, it may be unavailable:
|
||||||
CPPUNIT_ASSERT( locale->Init(wxLANGUAGE_FRENCH, wxLOCALE_CONV_ENCODING) );
|
CPPUNIT_ASSERT( locale->Init(wxLANGUAGE_FRENCH, wxLOCALE_DONT_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) );
|
||||||
|
|
||||||
static const struct ToDoubleData doubleData2[] =
|
static const struct ToDoubleData doubleData2[] =
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user