aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-15 07:26:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-15 07:26:55 +0800
commit4ff0a43cd48adc7cdc98be078cdfbc425aa7e8b0 (patch)
treedb724db4e864ce41a136ab6820559346c9cd9fe0 /mail/mail-config-factory.c
parent334b42bda165b9cfd18f60f60742f850f9154c2e (diff)
downloadgsoc2013-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-config-factory.c')
-rw-r--r--mail/mail-config-factory.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index fe1aa9cb2e..4e7e0ee2ed 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -48,16 +48,14 @@ struct _config_data {
};
static void
-config_control_destroy_callback (EvolutionConfigControl *config_control, void *user_data)
+config_control_destroy_cb (struct _config_data *data, GObject *deadbeef)
{
- struct _config_data *data = user_data;
-
g_object_unref (data->prefs);
g_free (data);
}
static void
-config_control_apply_callback (EvolutionConfigControl *config_control, void *user_data)
+config_control_apply_cb (EvolutionConfigControl *config_control, void *user_data)
{
struct _config_data *data = user_data;
@@ -116,8 +114,8 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_
g_assert_not_reached ();
}
- g_signal_connect(control, "apply", G_CALLBACK (config_control_apply_callback), data);
- g_signal_connect(control, "destroy", G_CALLBACK (config_control_destroy_callback), data);
+ g_signal_connect (control, "apply", G_CALLBACK (config_control_apply_cb), data);
+ g_object_weak_ref (control, (GWeakNotify) config_control_destroy_cb, data);
return BONOBO_OBJECT (control);
}