X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4444d148a54fe06f41200dd411d3b447fd751088..6d7b547184bfdcdf67790755deb0122050b1d728:/src/aui/tabmdi.cpp diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index add285982c..f2d772f3a1 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -132,7 +132,7 @@ void wxTabMDIParentFrame::SetWindowMenu(wxMenu* pMenu) } } -void wxTabMDIParentFrame::SetMenuBar(wxMenuBar *pMenuBar) +void wxTabMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar) { // Remove the Window menu from the old menu bar RemoveWindowMenu(GetMenuBar()); @@ -154,13 +154,13 @@ void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild) SetMenuBar(m_pMyMenuBar); // Make sure we know our menu bar is in use - m_pMyMenuBar = NULL; + //m_pMyMenuBar = NULL; } else { if (pChild->GetMenuBar() == NULL) return; - + // Do we need to save the current bar? if (m_pMyMenuBar == NULL) m_pMyMenuBar = GetMenuBar(); @@ -417,55 +417,6 @@ bool wxTabMDIChildFrame::Destroy() return false; } -/* - wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame(); - wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame")); - - bool bActive = false; - if (pParentFrame->GetActiveChild() == this) - { - pParentFrame->SetActiveChild(NULL); - pParentFrame->SetChildMenuBar(NULL); - bActive = true; - } - - wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow(); - - // remove page if it is still there - size_t pos; - for (pos = 0; pos < pClientWindow->GetPageCount(); pos++) - { - if (pClientWindow->GetPage(pos) == this) - { - if (pClientWindow->RemovePage(pos)) - pClientWindow->Refresh(); - break; - } - } - - if (bActive) - { - // Set the new selection to the a remaining page - if (pos < pClientWindow->GetPageCount()) - { - pClientWindow->SetSelection(pos); - } - else - { - if (pClientWindow->GetPageCount() >= 1) - pClientWindow->SetSelection(pClientWindow->GetPageCount() - 1); - } - } - - // delete the child frame with pending delete, as is - // customary with frame windows - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return true; -*/ - - #if wxUSE_MENUS void wxTabMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar) { @@ -595,9 +546,12 @@ void wxTabMDIChildFrame::DoShow(bool show) wxWindow::Show(show); } -void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int WXUNUSED(sizeFlags)) +void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) { m_mdi_newrect = wxRect(x, y, width, height); +#ifdef __WXGTK__ + wxPanel::DoSetSize(x,y,width, height, sizeFlags); +#endif } void wxTabMDIChildFrame::DoMoveWindow(int x, int y, int width, int height)