]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_frame.cpp
Close tree edit even if the change is vetoed to be consistent with MSW [patch 1110252]
[wxWidgets.git] / src / xrc / xh_frame.cpp
index 36461038f5ea1e1dccfe2d369de9b5c01fc3ea89..b88359aa1daf47cc0e2e9e21aaf90c90f86d7ca3 100644 (file)
@@ -8,7 +8,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "xh_frame.h"
 #endif
 
 #pragma implementation "xh_frame.h"
 #endif
 
@@ -19,6 +19,8 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
+#if wxUSE_XRC
+
 #include "wx/xrc/xh_frame.h"
 #include "wx/frame.h"
 #include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
 #include "wx/xrc/xh_frame.h"
 #include "wx/frame.h"
 #include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
@@ -69,6 +71,8 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
         frame->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         frame->Move(GetPosition());
         frame->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         frame->Move(GetPosition());
+    if (HasParam(wxT("icon")))
+        frame->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
 
     SetupWindow(frame);
 
 
     SetupWindow(frame);
 
@@ -84,3 +88,5 @@ bool wxFrameXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxFrame"));
 }
 {
     return IsOfClass(node, wxT("wxFrame"));
 }
+
+#endif // wxUSE_XRC