X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c693edf3bc9539378a7ac56d90d41d89c7dc7579..48b1d0ff4ff220d8f2994723f936a1ffa60addce:/src/gtk1/notebook.cpp

diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp
index 2ea952be80..6cac1f9135 100644
--- a/src/gtk1/notebook.cpp
+++ b/src/gtk1/notebook.cpp
@@ -220,7 +220,13 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
     m_acceptsFocus = TRUE;
     m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
 
-    PreCreation( parent, id, pos, size, style, name );
+    if (!PreCreation( parent, pos, size ) ||
+        !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
+    {
+        wxFAIL_MSG( _T("wxNoteBook creation failed") );
+	return FALSE;
+    }
+
 
     m_widget = gtk_notebook_new();
 
@@ -515,6 +521,9 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
     page->m_box = gtk_hbox_new( FALSE, 0 );
     gtk_container_border_width( GTK_CONTAINER(page->m_box), 2 );
 
+    gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate",
+      GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win );
+
     if (position < 0)
         gtk_notebook_append_page( notebook, win->m_widget, page->m_box );
     else 
@@ -522,9 +531,6 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
 
     page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data;
 
-    gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate",
-      GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win );
-
     /* set the label image */
     page->m_image = imageId;