]> git.saurik.com Git - wxWidgets.git/commitdiff
wxMDIChildFrame::DetachMenuBar() to fix SF bug 1232271
authorChris Elliott <biol75@york.ac.uk>
Fri, 29 Jul 2005 13:41:49 +0000 (13:41 +0000)
committerChris Elliott <biol75@york.ac.uk>
Fri, 29 Jul 2005 13:41:49 +0000 (13:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/mdi.h
src/msw/mdi.cpp

index a5bdff00cbe949402aa757a652f8ea208b40f4d4..dde5cc7e37b68645ae4811f8f3990bebcd3b0eae 100644 (file)
@@ -191,6 +191,7 @@ protected:
 private:
     bool m_needsInitialShow; // Show must be called in idle time after Creation
     bool m_needsResize; // flag which tells us to artificially resize the frame
+       virtual void DetachMenuBar() ;
 
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame)
index 46c4a0fc3508947174d32f896fe73ca2aee50d7e..0dce669ebfd1d8f5471cdfe029cdcb8d4b9b5abf 100644 (file)
@@ -850,6 +850,12 @@ void wxMDIChildFrame::InternalSetMenuBar()
     parent->m_parentFrameActive = false;
 }
 
+void wxMDIChildFrame::DetachMenuBar()
+{
+       RemoveWindowMenu(NULL, m_hMenu);
+       wxFrame::DetachMenuBar();
+}
+
 WXHICON wxMDIChildFrame::GetDefaultIcon() const
 {
     // we don't have any standard icons (any more)
@@ -1377,11 +1383,6 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
                 continue;
             }
 
-            if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Window")) )
-            {
-               success = true;
-               break;
-            }
 
             if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Help")) )
             {