]> 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 f1e1ad9fc9eee42c824e986373e8fa0c14f41a1f..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.
 #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
     {
         // 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
             return false;
     }
     // restore the original locale
@@ -2992,7 +2991,7 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
                         dateStyle = kCFDateFormatterShortStyle;
                         break;
                     case wxLOCALE_LONG_DATE_FMT:
                         dateStyle = kCFDateFormatterShortStyle;
                         break;
                     case wxLOCALE_LONG_DATE_FMT:
-                        dateStyle = kCFDateFormatterLongStyle;
+                        dateStyle = kCFDateFormatterFullStyle;
                         break;
                     case wxLOCALE_DATE_TIME_FMT:
                         dateStyle = kCFDateFormatterFullStyle;
                         break;
                     case wxLOCALE_DATE_TIME_FMT:
                         dateStyle = kCFDateFormatterFullStyle;