Commit mentioned fix/hack to enable controls

inside a notebook to calculate the right size.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2004-02-22 11:51:23 +00:00
parent b7b7dedc1f
commit d7f1759ac1
2 changed files with 20 additions and 6 deletions

View File

@ -222,9 +222,12 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
static void wxInsertChildInNotebook( wxNotebook* WXUNUSED(parent), wxWindow* WXUNUSED(child) )
static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child )
{
/* we don't do anything here but pray */
// Hack alert! We manually set the child window
// parent field so that GTK can query the
// notebook's style and font.
child->m_widget->parent = parent->m_widget;
}
//-----------------------------------------------------------------------------
@ -589,7 +592,11 @@ bool wxNotebook::InsertPage( size_t position,
wxCHECK_MSG( position <= GetPageCount(), FALSE,
_T("invalid page index in wxNotebookPage::InsertPage()") );
/* don't receive switch page during addition */
// Hack alert part II! See above in InsertChildInNotebook
// callback why this has to be done.
win->m_widget->parent = NULL;
// don't receive switch page during addition
gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );

View File

@ -222,9 +222,12 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
static void wxInsertChildInNotebook( wxNotebook* WXUNUSED(parent), wxWindow* WXUNUSED(child) )
static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child )
{
/* we don't do anything here but pray */
// Hack alert! We manually set the child window
// parent field so that GTK can query the
// notebook's style and font.
child->m_widget->parent = parent->m_widget;
}
//-----------------------------------------------------------------------------
@ -589,7 +592,11 @@ bool wxNotebook::InsertPage( size_t position,
wxCHECK_MSG( position <= GetPageCount(), FALSE,
_T("invalid page index in wxNotebookPage::InsertPage()") );
/* don't receive switch page during addition */
// Hack alert part II! See above in InsertChildInNotebook
// callback why this has to be done.
win->m_widget->parent = NULL;
// don't receive switch page during addition
gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );