]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
wxTextCtrk::GetRange() shouldn't crash on out of range request
[wxWidgets.git] / src / common / menucmn.cpp
index fa0bfec3d72499d42a46bdcbe3455099e9decc3a..49f2b2d20ffafc7b9e64d59fac4181cb1ceac7ab 100644 (file)
@@ -67,7 +67,7 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu,
     m_id          = id;
     m_kind        = kind;
     if (m_id == wxID_ANY)
-        m_id = wxNewId();
+        m_id = wxWindow::NewControlId();
     if (m_id == wxID_SEPARATOR)
         m_kind = wxITEM_SEPARATOR;
 
@@ -152,8 +152,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 +450,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 +463,7 @@ bool wxMenuBase::SendEvent(int id, int checked)
             wxWindow *win = menu->GetInvokingWindow();
             if ( win )
             {
-                processed = win->GetEventHandler()->ProcessEvent(event);
+                processed = win->HandleWindowEvent(event);
                 break;
             }
 
@@ -848,9 +846,8 @@ void wxMenuBarBase::SetLabelTop(size_t pos, const wxString& label)
 
 wxString wxMenuBarBase::GetLabelTop(size_t pos) const
 {
-    return GetMenuLabel(pos);
+    return GetMenuLabelText(pos);
 }
 #endif
 
-
 #endif // wxUSE_MENUS