]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_dlg.cpp
fixed memory leak with client data when using DeleteAllItems() (bug 1107215)
[wxWidgets.git] / src / xrc / xh_dlg.cpp
index 6108b8c3c3c3074fadecc146b526c7bf726fcb4d..235a352fd5a620309434e421a28cf2b891e681dc 100644 (file)
@@ -8,7 +8,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "xh_dlg.h"
 #endif
 
@@ -19,7 +19,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_XML && wxUSE_XRC
+#if wxUSE_XRC
 
 #include "wx/xrc/xh_dlg.h"
 #include "wx/dialog.h"
@@ -66,6 +66,8 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
         dlg->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         dlg->Move(GetPosition());
+    if (HasParam(wxT("icon")))
+        dlg->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
 
     SetupWindow(dlg);
 
@@ -82,4 +84,4 @@ bool wxDialogXmlHandler::CanHandle(wxXmlNode *node)
     return IsOfClass(node, wxT("wxDialog"));
 }
 
-#endif // wxUSE_XML && wxUSE_XRC
+#endif // wxUSE_XRC