fixed suppressing of wxFontMapper questions which was broken by GUI/base separation changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-07-20 18:40:24 +00:00
parent 38c4cb6aa7
commit 4dc5502753
3 changed files with 31 additions and 5 deletions

View File

@@ -362,6 +362,20 @@ void wxFontMapperBase::RestorePath(const wxString& pathOld)
wxFontEncoding
wxFontMapperBase::CharsetToEncoding(const wxString& charset,
bool WXUNUSED(interactive))
{
int enc = NonInteractiveCharsetToEncoding(charset);
if ( enc == wxFONTENCODING_UNKNOWN )
{
// we should return wxFONTENCODING_SYSTEM from here for unknown
// encodings
enc = wxFONTENCODING_SYSTEM;
}
return (wxFontEncoding)enc;
}
int
wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset)
{
wxFontEncoding encoding = wxFONTENCODING_SYSTEM;
@@ -382,7 +396,7 @@ wxFontMapperBase::CharsetToEncoding(const wxString& charset,
if ( value == wxFONTENCODING_UNKNOWN )
{
// don't try to find it, in particular don't ask the user
return wxFONTENCODING_SYSTEM;
return value;
}
if ( value >= 0 && value <= wxFONTENCODING_MAX )