]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
Applied patch [ 1701723 ] wxAUI: Added event for doubleclicks on the tabbar bg
[wxWidgets.git] / src / gtk / notebook.cpp
index be9cc04945a84553a0b6c2b4e66d6de0e9d1992c..c878f8728f9d9aadec9c02c66e10c6147c3d8f36 100644 (file)
@@ -294,26 +294,22 @@ int wxNotebook::DoSetSelection( size_t page, int flags )
 
     if ( !(flags & SetSelection_SendEvent) )
     {
-        g_signal_handlers_disconnect_by_func (m_widget,
-                                             (gpointer) gtk_notebook_page_changing_callback,
-                                             this);
+        g_signal_handlers_block_by_func(m_widget,
+            (gpointer)gtk_notebook_page_changing_callback, this);
 
-        g_signal_handlers_disconnect_by_func (m_widget,
-                                             (gpointer) gtk_notebook_page_changed_callback,
-                                             this);
+        g_signal_handlers_block_by_func(m_widget,
+            (gpointer)gtk_notebook_page_changed_callback, this);
     }
 
     gtk_notebook_set_current_page( GTK_NOTEBOOK(m_widget), page );
 
     if ( !(flags & SetSelection_SendEvent) )
     {
-        // reconnect to signals
+        g_signal_handlers_unblock_by_func(m_widget,
+            (gpointer)gtk_notebook_page_changing_callback, this);
 
-        g_signal_connect (m_widget, "switch_page",
-                          G_CALLBACK (gtk_notebook_page_changing_callback), this);
-
-        g_signal_connect_after (m_widget, "switch_page",
-                      G_CALLBACK (gtk_notebook_page_changed_callback), this);
+        g_signal_handlers_unblock_by_func(m_widget,
+            (gpointer)gtk_notebook_page_changed_callback, this);
     }
 
     wxNotebookPage *client = GetPage(page);