diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-11-15 07:26:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-11-15 07:26:55 +0800 |
commit | 4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0 (patch) | |
tree | db724db4e864ce41a136ab6820559346c9cd9fe0 /mail/mail-callbacks.c | |
parent | 334b42bda165b9cfd18f60f60742f850f9154c2e (diff) | |
download | gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar.gz gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar.bz2 gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar.lz gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar.xz gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.tar.zst gsoc2013-evolution-4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0.zip |
Use g_object_weak_ref rather than connecting to destroy.
2002-11-14 Jeffrey Stedfast <fejj@ximian.com>
* 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
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 29aa2498ef..649c7634ea 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1806,10 +1806,8 @@ addrbook_sender (GtkWidget *widget, gpointer user_data) popup_listener_cb, NULL, NULL, win); socket = find_socket (GTK_CONTAINER (control)); - gtk_signal_connect_object (GTK_OBJECT (socket), - "destroy", - G_CALLBACK (gtk_widget_destroy), - GTK_OBJECT (win)); + + g_object_weak_ref ((GObject *) socket, (GWeakNotify) gtk_widget_destroy, win); gtk_container_add (GTK_CONTAINER (win), control); gtk_widget_show_all (win); @@ -3225,8 +3223,10 @@ static GtkObject *subscribe_dialog = NULL; static void subscribe_dialog_destroy (GtkWidget *widget, gpointer user_data) { - g_object_unref (subscribe_dialog); - subscribe_dialog = NULL; + if (subscribe_dialog) { + g_object_unref (subscribe_dialog); + subscribe_dialog = NULL; + } } void @@ -3234,8 +3234,8 @@ manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path) { if (!subscribe_dialog) { subscribe_dialog = subscribe_dialog_new (); - g_signal_connect(SUBSCRIBE_DIALOG (subscribe_dialog)->app, "destroy", - G_CALLBACK(subscribe_dialog_destroy), NULL); + g_signal_connect (SUBSCRIBE_DIALOG (subscribe_dialog)->app, "destroy", + G_CALLBACK (subscribe_dialog_destroy), NULL); subscribe_dialog_show (subscribe_dialog); } else { |