]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
fix off by 1 error in GetTextRaw() (#4317)
[wxWidgets.git] / src / common / menucmn.cpp
index 884fa75167268fcabb89e77f699ba185eeb37541..db83047580ec2c0041b16babbfbf4c116c58b370 100644 (file)
@@ -125,6 +125,13 @@ void wxMenuItemBase::SetHelp(const wxString& str)
     }
 }
 
+#ifndef __WXPM__
+wxString wxMenuItemBase::GetLabelText(const wxString& text)
+{
+    return wxStripMenuCodes(text);
+}
+#endif
+
 #if WXWIN_COMPATIBILITY_2_8
 wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
 {
@@ -152,8 +159,6 @@ void wxMenuBase::Init(long style)
 wxMenuBase::~wxMenuBase()
 {
     WX_CLEAR_LIST(wxMenuItemList, m_items);
-
-    // Actually, in GTK, the submenus have to get deleted first.
 }
 
 // ----------------------------------------------------------------------------
@@ -452,7 +457,7 @@ bool wxMenuBase::SendEvent(int id, int checked)
     {
         wxEvtHandler *handler = GetEventHandler();
         if ( handler )
-            processed = handler->ProcessEvent(event);
+            processed = handler->SafelyProcessEvent(event);
     }
 
     // Try the window the menu was popped up from (and up through the
@@ -465,7 +470,7 @@ bool wxMenuBase::SendEvent(int id, int checked)
             wxWindow *win = menu->GetInvokingWindow();
             if ( win )
             {
-                processed = win->GetEventHandler()->ProcessEvent(event);
+                processed = win->HandleWindowEvent(event);
                 break;
             }
 
@@ -852,5 +857,4 @@ wxString wxMenuBarBase::GetLabelTop(size_t pos) const
 }
 #endif
 
-
 #endif // wxUSE_MENUS