X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cc208e39f61bca01cc23c339843891f099d47c5..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/generic/mdig.cpp?ds=sidebyside diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index 591bae2bc4..d18b731a5f 100644 --- a/src/generic/mdig.cpp +++ b/src/generic/mdig.cpp @@ -74,11 +74,7 @@ wxGenericMDIParentFrame::~wxGenericMDIParentFrame() wxDELETE(m_clientWindow); #if wxUSE_MENUS - if (m_pMyMenuBar) - { - delete m_pMyMenuBar; - m_pMyMenuBar = NULL; - } + wxDELETE(m_pMyMenuBar); RemoveWindowMenu(GetMenuBar()); #endif // wxUSE_MENUS @@ -363,7 +359,7 @@ bool wxGenericMDIParentFrame::ProcessEvent(wxEvent& event) // the menu events should be given to the child as we show its menu bar // as our own const wxEventType eventType = event.GetEventType(); - if ( eventType == wxEVT_COMMAND_MENU_SELECTED || + if ( eventType == wxEVT_MENU || eventType == wxEVT_UPDATE_UI ) { // set the flag indicating that this event was forwarded to the @@ -541,7 +537,7 @@ wxGenericMDIClientWindow::CreateGenericClient(wxWindow *parent) m_notebook = new wxNotebook(this, wxID_ANY); m_notebook->Connect ( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( wxGenericMDIClientWindow::OnPageChanged), NULL,