X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40d432c482326ccbc609b212415f3c62ddd4e70d..3013a903c1f32c31526a5229ec341b4a2f5c42fd:/src/gtk1/mdi.cpp diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 34c130d9d5..958a372944 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -237,11 +237,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const GtkNotebook *notebook = GTK_NOTEBOOK(m_clientWindow->m_widget); if (!notebook) return (wxMDIChildFrame*) NULL; -#if (GTK_MINOR_VERSION > 0) gint i = gtk_notebook_get_current_page( notebook ); -#else - gint i = gtk_notebook_current_page( notebook ); -#endif if (i < 0) return (wxMDIChildFrame*) NULL; GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data); @@ -297,7 +293,6 @@ wxMDIChildFrame::wxMDIChildFrame() { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; - m_isFrame = TRUE; } wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, @@ -307,7 +302,6 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; - m_isFrame = TRUE; Create( parent, id, title, wxDefaultPosition, size, style, name ); } @@ -327,6 +321,16 @@ bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name ); } +void wxMDIChildFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags ) +{ + wxWindow::DoSetSize( x, y, width, height, sizeFlags ); +} + +void wxMDIChildFrame::DoSetClientSize(int width, int height) +{ + wxWindow::DoSetClientSize( width, height ); +} + void wxMDIChildFrame::DoGetClientSize( int *width, int *height ) const { wxWindow::DoGetClientSize( width, height ); @@ -363,17 +367,10 @@ wxMenuBar *wxMDIChildFrame::GetMenuBar() const void wxMDIChildFrame::Activate() { -#if (GTK_MINOR_VERSION > 0) wxMDIParentFrame* parent = (wxMDIParentFrame*) GetParent(); GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget); - gint pageno = gtk_notebook_page_num( notebook, m_page->child ); + gint pageno = gtk_notebook_page_num( notebook, m_widget ); gtk_notebook_set_page( notebook, pageno ); -#else - // the only way I can see to do this under gtk+ 1.0.X would - // be to keep track of page numbers, start at first and - // do "next" enough times to get to this page number - messy - // - J. Russell Smyth -#endif } void wxMDIChildFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) @@ -402,7 +399,7 @@ void wxMDIChildFrame::SetTitle( const wxString &title ) wxMDIParentFrame* parent = (wxMDIParentFrame*) GetParent(); GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget); - gtk_notebook_set_tab_label_text(notebook, m_page->child, title.mbc_str()); + gtk_notebook_set_tab_label_text(notebook, m_widget, title.mbc_str()); } //-----------------------------------------------------------------------------