X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ff9d30c0aab3b281ef9b380eac17435556c5088..7f4f5e8c24607ead9b5e2f4c60658dcd61f028f4:/src/gtk/notebook.cpp?ds=sidebyside diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 60fe23a01f..4802f31fcd 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -104,7 +104,7 @@ static void event_after(GtkNotebook* widget, GdkEvent*, wxNotebook* win) // InsertChild callback for wxNotebook //----------------------------------------------------------------------------- -static void wxInsertChildInNotebook(wxWindow* parent, wxWindow* child) +void wxNotebook::AddChildGTK(wxWindowGTK* child) { // Hack Alert! (Part I): This sets the notebook as the parent of the child // widget, and takes care of some details such as updating the state and @@ -114,7 +114,7 @@ static void wxInsertChildInNotebook(wxWindow* parent, wxWindow* child) // incorrect sizes since the widget's style context is not fully known. // See bug #901694 for details // (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863) - gtk_widget_set_parent(child->m_widget, parent->m_widget); + gtk_widget_set_parent(child->m_widget, m_widget); // NOTE: This should be considered a temporary workaround until we can // work out the details and implement delaying the setting of the initial @@ -160,8 +160,6 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) { - m_insertCallback = wxInsertChildInNotebook; - if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) style |= wxBK_TOP; @@ -359,7 +357,7 @@ wxNotebookPage *wxNotebook::DoRemovePage( size_t page ) wxGtkNotebookPage* p = GetNotebookPage(page); m_pagesData.DeleteObject(p); delete p; - + return client; } @@ -375,9 +373,9 @@ bool wxNotebook::InsertPage( size_t position, wxT("Can't add a page whose parent is not the notebook!") ); wxCHECK_MSG( position <= GetPageCount(), false, - _T("invalid page index in wxNotebookPage::InsertPage()") ); + wxT("invalid page index in wxNotebookPage::InsertPage()") ); - // Hack Alert! (Part II): See above in wxInsertChildInNotebook callback + // Hack Alert! (Part II): See above in wxNotebook::AddChildGTK // why this has to be done. gtk_widget_unparent(win->m_widget); @@ -424,7 +422,7 @@ bool wxNotebook::InsertPage( size_t position, gtk_notebook_insert_page(notebook, win->m_widget, pageData->m_box, position); /* apply current style */ - GtkRcStyle *style = CreateWidgetStyle(); + GtkRcStyle *style = GTKCreateWidgetStyle(); if ( style ) { gtk_widget_modify_style(pageData->m_label, style);