-        wxNotebookEvent eventChanging( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
-                                    notebook->GetId(), page, old );
-        eventChanging.SetEventObject( notebook );
-
-        if ( (notebook->GetEventHandler()->ProcessEvent(eventChanging)) &&
-            !eventChanging.IsAllowed() )
-        {
-            /* program doesn't allow the page change */
-            g_signal_stop_emission_by_name (notebook->m_widget,
-                                            "switch_page");
-        }
-        else // change allowed
-        {
-            // make wxNotebook::GetSelection() return the correct (i.e. consistent
-            // with wxNotebookEvent::GetSelection()) value even though the page is
-            // not really changed in GTK+
-            notebook->m_selection = page;
-
-            wxNotebookEvent eventChanged( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
-                                        notebook->GetId(), page, old );
-            eventChanged.SetEventObject( notebook );
-            notebook->GetEventHandler()->ProcessEvent( eventChanged );
-        }
-    }
-
-    notebook->m_inSwitchPage = false;
-}
-}
-
-//-----------------------------------------------------------------------------
-// "size_allocate"
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
-{
-    if (g_isIdle)
-        wxapp_install_idle_handler();
-
-    if ((win->m_x == alloc->x) &&
-        (win->m_y == alloc->y) &&
-        (win->m_width == alloc->width) &&
-        (win->m_height == alloc->height))
-    {
-        return;
-    }
-
-    win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
-
-    /* GTK 1.2 up to version 1.2.5 is broken so that we have to call allocate
-       here in order to make repositioning after resizing to take effect. */
-    if ((gtk_major_version == 1) &&
-        (gtk_minor_version == 2) &&
-        (gtk_micro_version < 6) &&
-        (win->m_wxwindow) &&
-        (GTK_WIDGET_REALIZED(win->m_wxwindow)))
-    {
-        gtk_widget_size_allocate( win->m_wxwindow, alloc );