]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/mdig.cpp
Make wxOwnerDrawnComboBox::DoGetBestSize() twice as fast.
[wxWidgets.git] / src / generic / mdig.cpp
index 591bae2bc4bae926fbbbda5da72c7d84898afac3..c4a9a21f7b962832f4cde552abceae1273f9ebc6 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Hans Van Leemputten
 // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes
 // Created:     29/07/2002
-// RCS-ID:      $Id$
 // Copyright:   (c) 2002 Hans Van Leemputten
 //              (c) 2008 Vadim Zeitlin
 // Licence:     wxWindows licence
@@ -74,11 +73,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 +358,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 +536,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,