]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontmap.cpp
Added call to top-level window OnInternalIdle
[wxWidgets.git] / src / common / fontmap.cpp
index d858e43dd0c44ef957e534c226aff33f352eaaa9..4df6f648b1f0dd3bdfc56fcc70df2c8fe05c1270 100644 (file)
     #include "wx/intl.h"
 #endif // PCH
 
-#include "wx/fontmap.h"
-#include "wx/fmappriv.h"
-
 #if wxUSE_CONFIG
     #include "wx/config.h"
 #endif // wxUSE_CONFIG
 
+#if defined(__WXMSW__)
+  #include  "wx/msw/private.h"  // includes windows.h for LOGFONT
+  #include  "wx/msw/winundef.h"
+#endif
+
+#include "wx/fontmap.h"
+#include "wx/fmappriv.h"
 #include "wx/fontutil.h"
 #include "wx/msgdlg.h"
 #include "wx/fontdlg.h"
@@ -149,7 +153,7 @@ wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive)
             encoding = GetEncoding(n);
         }
 
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
         // save the result in the config now
         wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH);
         if ( path.IsOk() )
@@ -183,7 +187,7 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry,
     if ( wxGetNativeFontEncoding(encReplacement, info) &&
          wxTestFontEncoding(*info) )
     {
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
         // remember the mapping in the config
         wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
 
@@ -249,7 +253,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
     }
     configEntry += encName;
 
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
     // do we have a font spec for this encoding?
     wxString fontinfo;
     wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
@@ -361,7 +365,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
                 *info = retData.EncodingInfo();
                 info->encoding = retData.GetEncoding();
 
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
                 // remember this in the config
                 wxFontMapperPathChanger path(this,
                                              FONTMAPPER_FONT_FROM_ENCODING_PATH);
@@ -381,7 +385,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
             // or selected to use equivalent encoding
             //
             // remember it to avoid asking the same question again later
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
             wxFontMapperPathChanger path(this,
                                          FONTMAPPER_FONT_FROM_ENCODING_PATH);
             if ( path.IsOk() )