]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_fonts.cpp
Check for GTK window parent, not wx one, when reparenting.
[wxWidgets.git] / src / html / m_fonts.cpp
index 917a2f0eec3d326fe7b584d7bc10664f243818b2..422b73c5b9bd5f9817353b3c60f0ef020ef9231d 100644 (file)
@@ -15,7 +15,7 @@
 
 #if wxUSE_HTML && wxUSE_STREAMS
 
 
 #if wxUSE_HTML && wxUSE_STREAMS
 
-#ifndef WXPRECOMP
+#ifndef WX_PRECOMP
 #endif
 
 #include "wx/html/forcelnk.h"
 #endif
 
 #include "wx/html/forcelnk.h"
@@ -51,10 +51,11 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
 
         if (tag.HasParam(wxT("SIZE")))
         {
 
         if (tag.HasParam(wxT("SIZE")))
         {
-            int tmp = 0;
-            wxChar c = tag.GetParam(wxT("SIZE")).GetChar(0);
-            if (tag.GetParamAsInt(wxT("SIZE"), &tmp))
+            long tmp = 0;
+            const wxString sizeStr = tag.GetParam(wxT("SIZE"));
+            if (sizeStr.ToLong(&tmp))
             {
             {
+                wxChar c = sizeStr[0];
                 if (c == wxT('+') || c == wxT('-'))
                     m_WParser->SetFontSize(oldsize+tmp);
                 else
                 if (c == wxT('+') || c == wxT('-'))
                     m_WParser->SetFontSize(oldsize+tmp);
                 else
@@ -67,13 +68,8 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
         if (tag.HasParam(wxT("FACE")))
         {
             if (m_Faces.GetCount() == 0)
         if (tag.HasParam(wxT("FACE")))
         {
             if (m_Faces.GetCount() == 0)
-            {
-                wxFontEnumerator enu;
-                enu.EnumerateFacenames();
-                const wxArrayString *faces = enu.GetFacenames();
-                if ( faces )
-                    m_Faces = *faces;
-            }
+                m_Faces = wxFontEnumerator::GetFacenames();
+
             wxStringTokenizer tk(tag.GetParam(wxT("FACE")), wxT(","));
             int index;
 
             wxStringTokenizer tk(tag.GetParam(wxT("FACE")), wxT(","));
             int index;