shorter code for wxMac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-12-04 17:50:33 +00:00
parent 3a12b759c9
commit b2beaece19

View File

@@ -1940,12 +1940,9 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
// because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg // because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg
// az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here // az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here
CFTypeRef cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode); wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
wxMacCFStringHolder str(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
langFull = str.AsString()+"_"; langFull = str.AsString()+"_";
str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode);
str.Assign(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
langFull += str.AsString(); langFull += str.AsString();
#else #else
if (!wxGetEnv(wxT("LC_ALL"), &langFull) && if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&