X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52af3158e974b042008474268570f3bdb7ce95ee..72da4057731919c6d386aa5a4cf8f3d0258bbe46:/src/motif/menu.cpp diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index be5776e4c0..6eae7b96dd 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -33,8 +33,6 @@ #ifdef __VMS__ #pragma message disable nosimpint -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW #endif #include #include @@ -162,17 +160,14 @@ void wxMenu::SetTitle(const wxString& label) bool wxMenu::ProcessCommand(wxCommandEvent & event) { - bool processed = false; + // Try the menu's event handler first + wxEvtHandler * const handler = GetEventHandler(); + bool processed = handler ? handler->SafelyProcessEvent(event) : false; - // Try the menu's event handler - if ( !processed && GetEventHandler()) - { - processed = GetEventHandler()->ProcessEvent(event); - } // Try the window the menu was popped up from (and up // through the hierarchy) if ( !processed && GetInvokingWindow()) - processed = GetInvokingWindow()->ProcessEvent(event); + processed = GetInvokingWindow()->HandleWindowEvent(event); return processed; } @@ -236,7 +231,7 @@ void wxMenuBar::SetMenuLabel(size_t pos, const wxString& label) XmNlabelString, label_str(), NULL); } - m_titles[i] = label; + m_titles[pos] = label; } wxString wxMenuBar::GetMenuLabel(size_t pos) const