X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/848332140be2d53aea32d0702f4c0e06c149d24b..4913272f9cdead94a6d1470e51d6fb14946b50e0:/src/gtk/mdi.cpp diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index f793871ed4..031eae9e19 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -10,14 +10,17 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_MDI + #include "wx/mdi.h" -#include "wx/notebook.h" -#if wxUSE_MDI +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/menu.h" + #include "wx/dialog.h" +#endif -#include "wx/dialog.h" -#include "wx/menu.h" -#include "wx/intl.h" +#include "wx/notebook.h" #include "wx/gtk/private.h" #include @@ -35,8 +38,6 @@ const int wxMENU_HEIGHT = 27; // globals //----------------------------------------------------------------------------- -extern wxList wxPendingDelete; - //----------------------------------------------------------------------------- // "switch_page" //----------------------------------------------------------------------------- @@ -70,16 +71,14 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), child = (wxMDIChildFrame*) NULL; wxWindowList::compatibility_iterator node = client_window->GetChildren().GetFirst(); - while (node) + while ( node ) { wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); - // CE: we come here in the destructor with a null child_frame - I think because - // g_signal_connect (m_widget, "switch_page", (see below) - // isn't deleted early enough - if (!child_frame) - return ; - if (child_frame->m_page == page) + // child_frame can be NULL when this is called from dtor, probably + // because g_signal_connect (m_widget, "switch_page", (see below) + // isn't deleted early enough + if ( child_frame && child_frame->m_page == page ) { child = child_frame; break; @@ -127,9 +126,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent, return true; } -void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) +void wxMDIParentFrame::GtkOnSize() { - wxFrame::GtkOnSize( x, y, width, height ); + wxFrame::GtkOnSize(); wxMDIChildFrame *child_frame = GetActiveChild(); if (!child_frame) return; @@ -242,11 +241,6 @@ void wxMDIParentFrame::OnInternalIdle() } } -void wxMDIParentFrame::DoGetClientSize(int *width, int *height ) const -{ - wxFrame::DoGetClientSize( width, height ); -} - wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const { if (!m_clientWindow) return (wxMDIChildFrame*) NULL;