[rhythmbox] source-toolbar: remove ui-manager signal handlers in dispose



commit c2239ae101f58eb0c2ea6bc13e061b1de65564c2
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Sep 5 09:25:27 2012 +1000

    source-toolbar: remove ui-manager signal handlers in dispose
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677464

 widgets/rb-source-toolbar.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/widgets/rb-source-toolbar.c b/widgets/rb-source-toolbar.c
index 8534b84..893db84 100644
--- a/widgets/rb-source-toolbar.c
+++ b/widgets/rb-source-toolbar.c
@@ -34,6 +34,9 @@
 static void rb_source_toolbar_class_init (RBSourceToolbarClass *klass);
 static void rb_source_toolbar_init (RBSourceToolbar *toolbar);
 
+static void toolbar_add_widget_cb (GtkUIManager *ui_manager, GtkWidget *widget, RBSourceToolbar *toolbar);
+static void popup_add_widget_cb (GtkUIManager *ui_manager, GtkWidget *widget, RBSourceToolbar *toolbar);
+
 struct _RBSourceToolbarPrivate
 {
 	GtkUIManager *ui_manager;
@@ -241,6 +244,9 @@ impl_dispose (GObject *object)
 	RBSourceToolbar *toolbar = RB_SOURCE_TOOLBAR (object);
 
 	if (toolbar->priv->ui_manager != NULL) {
+		g_signal_handlers_disconnect_by_func (toolbar->priv->ui_manager, G_CALLBACK (popup_add_widget_cb), toolbar);
+		g_signal_handlers_disconnect_by_func (toolbar->priv->ui_manager, G_CALLBACK (toolbar_add_widget_cb), toolbar);
+
 		g_object_unref (toolbar->priv->ui_manager);
 		toolbar->priv->ui_manager = NULL;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]