From 4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 14 Nov 2002 23:26:55 +0000 Subject: Use g_object_weak_ref rather than connecting to destroy. 2002-11-14 Jeffrey Stedfast * mail-accounts.c (account_edit_clicked): Use g_object_weak_ref rather than connecting to destroy. (account_add_clicked): Same. * mail-callbacks.c (addrbook_sender): Make this use g_object_weak_notify also. (subscribe_dialog_destroy): Add NULL guards here since I think we really do want to connect to the "destroy" signal in the function that connects us to that signal. * mail-config-factory.c (config_control_factory_cb): Same. * mail-display.c (save_part): Here too. (make_popup_window): And here. * mail-send-recv.c (build_dialogue): Same here. * mail-summary.c (create_summary_view): Use g_object_weak_notify instead of connecting to the destroy signal. svn path=/trunk/; revision=18764 --- mail/mail-summary.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mail/mail-summary.c') diff --git a/mail/mail-summary.c b/mail/mail-summary.c index 95aaeb7c64..0ddaa6412f 100644 --- a/mail/mail-summary.c +++ b/mail/mail-summary.c @@ -162,8 +162,7 @@ summary_free (MailSummary *summary) } static void -view_destroy_cb (GtkObject *object, - MailSummary *summary) +view_destroy_cb (MailSummary *summary, GObject *deadbeef) { summary_free (summary); g_free (summary); @@ -478,8 +477,8 @@ create_summary_view (ExecutiveSummaryComponentFactory *_factory, view = executive_summary_html_view_new_full (event_source); bonobo_object_add_interface (component, view); summary->view = view; - gtk_signal_connect (GTK_OBJECT (view), "destroy", - GTK_SIGNAL_FUNC (view_destroy_cb), summary); + + g_object_weak_notify ((GObject *) view, (GWeakNotify) view_destroy_cb, summary); bag = bonobo_property_bag_new_full (get_property, NULL, event_source, summary); -- cgit v1.2.3