[gnome-panel/wip/segeiger/panel-add-to-dialog] PanelAddtoDialog: Remove destroy function and move code to finalize function



commit 3054560e695bb7351947fcb9d65f5fa0212c0520
Author: Sebastian Geiger <sbastig gmx net>
Date:   Fri Jul 17 00:11:57 2015 +0200

    PanelAddtoDialog: Remove destroy function and move code to finalize function

 gnome-panel/panel-add-to-dialog.ui |    1 -
 gnome-panel/panel-addto.c          |   15 +++++----------
 2 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/gnome-panel/panel-add-to-dialog.ui b/gnome-panel/panel-add-to-dialog.ui
index a2a811f..48c6c78 100644
--- a/gnome-panel/panel-add-to-dialog.ui
+++ b/gnome-panel/panel-add-to-dialog.ui
@@ -14,7 +14,6 @@
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Add to Panel</property>
-    <signal name="destroy" handler="panel_addto_dialog_destroy" swapped="yes"/>
     <child>
       <object class="GtkBox" id="dialog_vbox">
         <property name="visible">True</property>
diff --git a/gnome-panel/panel-addto.c b/gnome-panel/panel-addto.c
index 0e48a5b..72af95f 100644
--- a/gnome-panel/panel-addto.c
+++ b/gnome-panel/panel-addto.c
@@ -856,15 +856,6 @@ panel_addto_dialog_button_back (PanelAddtoDialog *dialog,
 }
 
 static void
-panel_addto_dialog_destroy (PanelAddtoDialog *dialog)
-{
-       panel_toplevel_pop_autohide_disabler (PANEL_TOPLEVEL (dialog->panel_widget->toplevel));
-       g_object_set_qdata (G_OBJECT (dialog->panel_widget->toplevel),
-                           panel_addto_dialog_quark,
-                           NULL);
-}
-
-static void
 panel_addto_dialog_button_close (PanelAddtoDialog *dialog,
                                  GtkWidget        *widget) {
        gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -1241,6 +1232,11 @@ panel_addto_dialog_finalize (GObject *object)
        PanelAddtoDialog *dialog;
        GSList           *item;
 
+       panel_toplevel_pop_autohide_disabler (PANEL_TOPLEVEL (dialog->panel_widget->toplevel));
+       g_object_set_qdata (G_OBJECT (dialog->panel_widget->toplevel),
+                                               panel_addto_dialog_quark,
+                                               NULL);
+
        dialog = PANEL_ADDTO_DIALOG (object);
        g_free (dialog->search_text);
        dialog->search_text = NULL;
@@ -1290,7 +1286,6 @@ panel_addto_dialog_class_init (PanelAddtoDialogClass *dialog_class)
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_dialog_button_close);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_search_entry_changed);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_search_entry_activated);
-       gtk_widget_class_bind_template_callback (widget_class, panel_addto_dialog_destroy);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_selection_changed);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_selection_activated);
 }


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