// there may be a catalog with toolkit specific overrides, it is not
// an error if this does not exist
- if ( bOk && wxTheApp )
+ if ( bOk )
{
- wxAppTraits *traits = wxTheApp->GetTraits();
- if (traits)
- AddCatalog(traits->GetToolkitInfo().name.BeforeFirst(wxT('/')).MakeLower());
+ wxString port(wxPlatformInfo().GetPortIdName());
+ if ( !port.empty() )
+ {
+ AddCatalog(port.BeforeFirst(wxT('/')).MakeLower());
+ }
}
}
wxFontEncoding enc = wxFontMapperBase::GetEncodingFromName(encname);
// on some modern Linux systems (RedHat 8) the default system locale
- // is UTF8 -- but it isn't supported by wxGTK in ANSI build at all so
+ // is UTF8 -- but it isn't supported by wxGTK1 in ANSI build at all so
// don't even try to use it in this case
-#if !wxUSE_UNICODE && (defined(__WXGTK__) || defined(__WXMOTIF__))
+#if !wxUSE_UNICODE && \
+ ((defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__WXMOTIF__))
if ( enc == wxFONTENCODING_UTF8 )
{
// the most similar supported encoding...