[gnome-panel/wip/segeiger/panel-add-to-dialog: 2/2] panel-addto-dialog: Use g_signal_connect_object



commit 88d1b44b614c735c4530c0f31fb9c0b25cf06af3
Author: Sebastian Geiger <sbastig gmx net>
Date:   Fri Jul 17 00:16:05 2015 +0200

    panel-addto-dialog: Use g_signal_connect_object

 gnome-panel/panel-addto-dialog.c |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/gnome-panel/panel-addto-dialog.c b/gnome-panel/panel-addto-dialog.c
index fe49262..38cd50e 100644
--- a/gnome-panel/panel-addto-dialog.c
+++ b/gnome-panel/panel-addto-dialog.c
@@ -75,8 +75,6 @@ struct _PanelAddtoDialog
        gchar        *search_text;
        gchar        *applet_search_text;
 
-       guint         name_notify;
-
        PanelObjectPackType insert_pack_type;
 };
 
@@ -1155,11 +1153,11 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
                            dialog);
 
        dialog->panel_widget = panel_widget;
-       dialog->name_notify =
-               g_signal_connect (dialog->panel_widget->toplevel,
-                                 "notify::name",
-                                 G_CALLBACK (panel_addto_name_notify),
-                                 dialog);
+
+       g_signal_connect_object (dialog->panel_widget->toplevel,
+                                "notify::name",
+                                G_CALLBACK (panel_addto_name_notify),
+                                dialog, 0);
 
        gtk_widget_show_all (dialog->dialog_vbox);
 
@@ -1200,12 +1198,6 @@ panel_addto_dialog_dispose (GObject *object)
 
        dialog = PANEL_ADDTO_DIALOG (object);
 
-       if (dialog->name_notify)
-               g_signal_handler_disconnect (dialog->panel_widget->toplevel,
-                                            dialog->name_notify);
-
-       dialog->name_notify = 0;
-
        g_clear_object (&dialog->filter_applet_model);
        g_clear_object (&dialog->applet_model);
        g_clear_object (&dialog->filter_application_model);


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