extern "C" {
static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
- GtkNotebookPage *WXUNUSED(page),
+ GtkNotebookPage *WXUNUSED(gpage),
guint page,
wxNotebook *notebook )
{
}
else
{
- wxNotebookEvent eventChanging( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
- notebook->GetId(), page, old );
- eventChanging.SetEventObject( notebook );
-
- if ( (notebook->GetEventHandler()->ProcessEvent(eventChanging)) &&
- !eventChanging.IsAllowed() )
+ if ( !notebook->SendPageChangingEvent(page) )
{
- /* program doesn't allow the page change */
- g_signal_stop_emission_by_name (notebook->m_widget,
- "switch_page");
+ // program doesn't allow the page change
+ g_signal_stop_emission_by_name(notebook->m_widget, "switch_page");
}
else // change allowed
{
// 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->SendPageChangedEvent(old);
}
}