X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48d43515c24e7f3032a7119179da4eddaf4c1ed4..50f12a63130b81796ea531c59af97f0544cf158d:/src/osx/menu_osx.cpp diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index 4280dcfa1c..cf7dcaa670 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -428,8 +428,8 @@ bool wxMenu::HandleCommandProcess( wxMenuItem* item, wxWindow* senderWindow ) { if ( senderWindow != NULL ) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED , menuid); - event.SetEventObject(senderWindow); + wxCommandEvent event(wxEVT_MENU , menuid); + event.SetEventObject(this); event.SetInt(item->IsCheckable() ? item->IsChecked() : -1); if ( senderWindow->HandleWindowEvent(event) ) @@ -616,11 +616,10 @@ void wxMenuBar::MacInstallMenuBar() // hide items in the apple menu that don't exist in the wx menubar - int menuid = 0; wxMenuItem* appleItem = NULL; wxMenuItem* wxItem = NULL; - menuid = wxApp::s_macAboutMenuItemId; + int menuid = wxApp::s_macAboutMenuItemId; appleItem = m_appleMenu->FindItem(menuid); wxItem = FindItem(menuid); if ( appleItem != NULL ) @@ -889,6 +888,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) return false; m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) ); + menu->SetTitle(title); return true; }