]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_menu.cpp
Move constant strings to .rodata/.data.rel.ro ELF segment from .data by making them...
[wxWidgets.git] / src / xrc / xh_menu.cpp
index e439e69d6605014363d68f880c96d5826fcb18d2..5b13b5be3c9d3d3979877febd0058a77e6940c0b 100644 (file)
@@ -8,10 +8,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "xh_menu.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -48,12 +44,18 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
 
         wxMenuBar *p_bar = wxDynamicCast(m_parent, wxMenuBar);
         if (p_bar)
+        {
             p_bar->Append(menu, title);
+        }
         else
         {
             wxMenu *p_menu = wxDynamicCast(m_parent, wxMenu);
             if (p_menu)
+            {
                 p_menu->Append(GetID(), title, menu, help);
+                if (HasParam(wxT("enabled")))
+                    p_menu->Enable(GetID(), GetBool(wxT("enabled")));
+            }
         }
 
         return menu;
@@ -88,7 +90,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
             wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
                                                GetText(wxT("help")), kind);
 
-#if !defined(__WXMSW__) || wxUSE_OWNER_DRAWN
+#if (!defined(__WXMSW__) && !defined(__WXPM__)) || wxUSE_OWNER_DRAWN
             if (HasParam(wxT("bitmap")))
                 mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU));
 #endif