]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
Do not use Tooltips if they are disabled
[wxWidgets.git] / src / common / intl.cpp
index ce5a0adfbf81b953ee13809420c956459adeef3a..0960dfc57b9fbfb6007e3964d28522a1c7495455 100644 (file)
@@ -2517,13 +2517,12 @@ bool wxLocale::IsAvailable(int lang)
 #elif defined(__UNIX__)
 
     // Test if setting the locale works, then set it back.
-    const char *oldLocale = wxSetlocale(LC_ALL, "");
-    const char *tmp = wxSetlocaleTryUTF8(LC_ALL, info->CanonicalName);
-    if ( !tmp )
+    const char *oldLocale = wxSetlocaleTryUTF8(LC_ALL, info->CanonicalName);
+    if ( !oldLocale )
     {
         // Some C libraries don't like xx_YY form and require xx only
-        tmp = wxSetlocaleTryUTF8(LC_ALL, ExtractLang(info->CanonicalName));
-        if ( !tmp )
+        oldLocale = wxSetlocaleTryUTF8(LC_ALL, ExtractLang(info->CanonicalName));
+        if ( !oldLocale )
             return false;
     }
     // restore the original locale