]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Avoid problems with events that might be sent during creation of controls.
[wxWidgets.git] / src / xrc / xmlres.cpp
index d85ca8d4598f9b6e404023f4cbcb3e2d86c4fb32..789761a6e1fba0d46785caaad5ea4e56564857fc 100644 (file)
@@ -26,6 +26,7 @@
     #include "wx/frame.h"
     #include "wx/dialog.h"
     #include "wx/settings.h"
+    #include "wx/bitmap.h"
 #endif
 
 #ifndef __WXWINCE__
@@ -38,7 +39,6 @@
 #include "wx/tokenzr.h"
 #include "wx/fontenum.h"
 #include "wx/module.h"
-#include "wx/bitmap.h"
 #include "wx/image.h"
 #include "wx/fontmap.h"
 #include "wx/artprov.h"
@@ -643,7 +643,7 @@ static void MergeNodes(wxXmlNode& dest, wxXmlNode& with)
         }
     }
 
-    if ( dest.GetType() == wxXML_TEXT_NODE && with.GetContent().Length() )
+    if ( dest.GetType() == wxXML_TEXT_NODE && with.GetContent().length() )
          dest.SetContent(with.GetContent());
 }
 
@@ -1351,15 +1351,14 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
     if (hasFacename)
     {
         wxString faces = GetParamValue(wxT("face"));
-        wxFontEnumerator enu;
-        enu.EnumerateFacenames();
+        wxArrayString facenames(wxFontEnumerator::GetFacenames());
         wxStringTokenizer tk(faces, wxT(","));
         while (tk.HasMoreTokens())
         {
-            int index = enu.GetFacenames()->Index(tk.GetNextToken(), false);
+            int index = facenames.Index(tk.GetNextToken(), false);
             if (index != wxNOT_FOUND)
             {
-                facename = (*enu.GetFacenames())[index];
+                facename = facenames[index];
                 break;
             }
         }