]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
disable children when the parent is disabled
[wxWidgets.git] / src / common / intl.cpp
index 7d115e81a6f694b674a46b032266f5dc3d6c5abe..b5bd55ddea6ee81ed8ef19d038036a611d813019 100644 (file)
@@ -300,6 +300,15 @@ static wxString GetFullSearchPath(const wxChar *lang)
     if ( pszLcPath != NULL )
         searchPath << GetAllMsgCatalogSubdirs(pszLcPath, lang);
 
+#ifdef __UNIX__
+    // add some standard ones and the one in the tree where wxWin was installed:
+    searchPath
+        << GetAllMsgCatalogSubdirs(wxString(wxGetInstallPrefix()) + wxT("/share/locale"), lang)
+        << GetAllMsgCatalogSubdirs(wxT("/usr/share/locale"), lang)
+        << GetAllMsgCatalogSubdirs(wxT("/usr/lib/locale"), lang)
+        << GetAllMsgCatalogSubdirs(wxT("/usr/local/share/locale"), lang);
+#endif // __UNIX__
+
     // then take the current directory
     // FIXME it should be the directory of the executable
 #ifdef __WXMAC__
@@ -310,14 +319,6 @@ static wxString GetFullSearchPath(const wxChar *lang)
 #else // !Mac
     searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang);
 
-#ifdef __UNIX__
-    // and finally add some standard ones
-    searchPath
-        << GetAllMsgCatalogSubdirs(wxT("/usr/share/locale"), lang)
-        << GetAllMsgCatalogSubdirs(wxT("/usr/lib/locale"), lang)
-        << GetAllMsgCatalogSubdirs(wxT("/usr/local/share/locale"), lang);
-#endif // __UNIX__
-
 #endif // platform
 
     return searchPath;
@@ -1275,7 +1276,7 @@ wxString wxLocale::GetSystemEncodingName()
         }
         else
         {
-            encname = wxConvLibc.cMB2WX(alang);
+            encname = wxString::FromAscii( alang );
         }
     }
     else
@@ -1284,24 +1285,24 @@ wxString wxLocale::GetSystemEncodingName()
         // if we can't get at the character set directly, try to see if it's in
         // the environment variables (in most cases this won't work, but I was
         // out of ideas)
-        wxChar *lang = wxGetenv(wxT("LC_ALL"));
-        wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
+        char *lang = getenv( "LC_ALL");
+        char *dot = lang ? strchr(lang, '.') : (char *)NULL;
         if (!dot)
         {
-            lang = wxGetenv(wxT("LC_CTYPE"));
+            lang = getenv( "LC_CTYPE" );
             if ( lang )
-                dot = wxStrchr(lang, wxT('.'));
+                dot = strchr(lang, '.' );
         }
         if (!dot)
         {
-            lang = wxGetenv(wxT("LANG"));
+            lang = getenv( "LANG");
             if ( lang )
-                dot = wxStrchr(lang, wxT('.'));
+                dot = strchr(lang, '.');
         }
 
         if ( dot )
         {
-            encname = dot+1;
+            encname = wxString::FromAscii( dot+1 );
         }
     }
 #endif // Win32/Unix