]> git.0d.be Git - empathy.git/commitdiff
Hook up to the destroy signal in EmpathyAccountWidget
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 29 Jul 2009 21:38:00 +0000 (23:38 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 29 Jul 2009 22:13:21 +0000 (00:13 +0200)
libempathy-gtk/empathy-account-widget.c

index 5cfff21d9348d96dc79df647b186a7c4cd39f93a..2b6439f1dd27f4f46fc5d23acdd39fad8a1db599 100644 (file)
@@ -707,6 +707,13 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
   self->ui_details->add_forget = TRUE;
 }
 
+static void
+account_widget_destroy_cb (GtkWidget *widget,
+    EmpathyAccountWidget *self)
+{
+  g_object_unref (self);
+}
+
 static void
 do_set_property (GObject *object,
     guint prop_id,
@@ -832,6 +839,10 @@ do_constructed (GObject *obj)
   account_widget_handle_apply_sensitivity (self);
   gtk_widget_show (priv->apply_button);
 
+  /* hook up to widget destruction to unref ourselves */
+  g_signal_connect (self->ui_details->widget, "destroy",
+      G_CALLBACK (account_widget_destroy_cb), self);
+
   empathy_builder_unref_and_keep_widget (self->ui_details->gui, self->ui_details->widget);
 }