]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/mdig.cpp
missing commit
[wxWidgets.git] / src / generic / mdig.cpp
index 3326c0592c0bb77da611b2b74458129d18602ad6..d18b731a5f90a678357d332a45620e22fff496a6 100644 (file)
@@ -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
@@ -515,7 +511,7 @@ void wxGenericMDIChildFrame::OnClose(wxCloseEvent& WXUNUSED(event))
     delete this;
 }
 
-bool wxGenericMDIChildFrame::TryParent(wxEvent& event)
+bool wxGenericMDIChildFrame::TryAfter(wxEvent& event)
 {
     // we shouldn't propagate the event to the parent if we received it from it
     // in the first place
@@ -523,7 +519,7 @@ bool wxGenericMDIChildFrame::TryParent(wxEvent& event)
     if ( parent && parent->WXIsInsideChildHandler(this) )
         return false;
 
-    return wxTDIChildFrame::TryParent(event);
+    return wxTDIChildFrame::TryAfter(event);
 }
 
 // ----------------------------------------------------------------------------
@@ -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,