]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wxLOCALE_DONT_LOAD_DEFAULT (=0) for clarity.
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 16 Apr 2010 11:29:09 +0000 (11:29 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 16 Apr 2010 11:29:09 +0000 (11:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/intl.h
interface/wx/intl.h
samples/internat/internat.cpp
tests/intl/intltest.cpp
tests/strings/strings.cpp

index 28bb8ce1664fb76b89a03c7000c946e0b81321b2..55721391125a616dbaf6b9b2ad8b83ee626c96b8 100644 (file)
@@ -408,8 +408,9 @@ enum wxLocaleInfo
 
 enum wxLocaleInitFlags
 {
-    wxLOCALE_LOAD_DEFAULT  = 0x0001,     // load wxwin.mo?
-    wxLOCALE_CONV_ENCODING = 0x0002      // convert encoding on the fly?
+    wxLOCALE_DONT_LOAD_DEFAULT = 0x0000,     // don't load wxwin.mo
+    wxLOCALE_LOAD_DEFAULT      = 0x0001,     // load wxwin.mo?
+    wxLOCALE_CONV_ENCODING     = 0x0002      // convert encoding on the fly?
 };
 
 class WXDLLIMPEXP_BASE wxLocale
index b0e0567fcb11e2c5e2a650c078c6758d7b374fc5..0345f2cf69ea05bfef41a25e7d5d7aecd83f5451 100644 (file)
@@ -762,6 +762,7 @@ public:
             - wxLOCALE_LOAD_DEFAULT: Load the message catalog for the given locale
               containing the translations of standard wxWidgets messages
               automatically.
+            - wxLOCALE_DONT_LOAD_DEFAULT: Negation of wxLOCALE_LOAD_DEFAULT.
             - wxLOCALE_CONV_ENCODING: Automatically convert message catalogs to
               platform's default encoding. Note that it will do only basic
               conversion between well-known pair like iso8859-1 and windows-1252 or
index 7a5c5b65a370a0608f2fac416effa1e5a21b556b..ba9b735ad9e0338fd169b8da0a9353f7dbdb2cc4 100644 (file)
@@ -229,7 +229,7 @@ bool MyApp::OnInit()
 
     // don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
     // 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."));
 
index 094d6bedf54eb968a9caa3f1883a45d4076efaf7..0e6b8948b473cbd7f65e2193dd47dbc66ecefbb4 100644 (file)
@@ -75,7 +75,7 @@ void IntlTestCase::setUp()
     CPPUNIT_ASSERT( m_locale );
 
     // 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 );
 
     m_locale->AddCatalog("internat");
index bc8a02817ca6ae37c4e5e8ce93871eb656528468..cdba4098bc0263763a96ed5eec2c5a0a3101e3f0 100644 (file)
@@ -720,7 +720,7 @@ void StringTestCase::ToDouble()
     wxLocale *locale = new wxLocale;
     
     // 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[] =
     {