X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1c75e0f93b4ec9f45827cc5a2d16ef17a675dfc..3d3a4a25addf9729c74a8d0f7a056b57bb7f7e2a:/src/common/fontmap.cpp diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 4df6f648b1..18fc3917c2 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -85,6 +85,8 @@ public: private: bool m_flagOld; bool& m_flag; + + DECLARE_NO_COPY_CLASS(ReentrancyBlocker) }; // ============================================================================ @@ -108,11 +110,16 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) { // try the ways not needing the users intervention first - wxFontEncoding - encoding = wxFontMapperBase::CharsetToEncoding(charset, interactive); + int encoding = wxFontMapperBase::NonInteractiveCharsetToEncoding(charset); // if we failed to find the encoding, ask the user -- unless disabled - if ( (encoding == wxFONTENCODING_SYSTEM) && interactive ) + if ( encoding == wxFONTENCODING_UNKNOWN ) + { + // this is the special value which disables asking the user (he had + // chosen to suppress this the last time) + encoding = wxFONTENCODING_SYSTEM; + } + else if ( (encoding == wxFONTENCODING_SYSTEM) && interactive ) { // prepare the dialog data @@ -171,7 +178,7 @@ wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) #endif // wxUSE_CONFIG } - return encoding; + return (wxFontEncoding)encoding; } // ----------------------------------------------------------------------------