X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03b444f6afb08ede0a50e3f68ef686337e1b380c..a679468530239a32cf7efa0d566d5c03a9c90c3f:/src/gtk1/mdi.cpp diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 99bcb7ede4..999be74c6e 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -18,6 +18,7 @@ #include "wx/dialog.h" #include "wx/menu.h" #include "wx/intl.h" +#include "wx/gtk/private.h" #include #include @@ -237,11 +238,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); @@ -325,6 +322,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 ); @@ -361,17 +368,10 @@ wxMenuBar *wxMDIChildFrame::GetMenuBar() const void wxMDIChildFrame::Activate() { -#if defined(__WXGTK20__) || (GTK_MINOR_VERSION > 0) wxMDIParentFrame* parent = (wxMDIParentFrame*) GetParent(); GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget); gint pageno = gtk_notebook_page_num( notebook, m_widget ); gtk_notebook_set_page( notebook, pageno ); -#else // GTK+ 1.0 - // 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) ) @@ -400,7 +400,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_widget, title.mbc_str()); + gtk_notebook_set_tab_label_text(notebook, m_widget, wxGTK_CONV( title ) ); } //-----------------------------------------------------------------------------