diff options
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-account-manager.c | 21 | ||||
-rw-r--r-- | libempathy/empathy-contact-manager.c | 5 |
2 files changed, 24 insertions, 2 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c index 5859d26c0..2eab490ac 100644 --- a/libempathy/empathy-account-manager.c +++ b/libempathy/empathy-account-manager.c @@ -341,8 +341,23 @@ empathy_account_manager_init (EmpathyAccountManager *manager) dbus_g_proxy_connect_signal (DBUS_G_PROXY (priv->mc), "AccountStatusChanged", G_CALLBACK (account_status_changed_cb), - g_object_ref (manager), - (GClosureNotify) g_object_unref); + manager, NULL); +} + +static void +disconnect_monitor_signals (McAccountMonitor *monitor, + GObject *obj) +{ + g_signal_handlers_disconnect_by_func (monitor, + account_created_cb, obj); + g_signal_handlers_disconnect_by_func (monitor, + account_deleted_cb, obj); + g_signal_handlers_disconnect_by_func (monitor, + account_disabled_cb, obj); + g_signal_handlers_disconnect_by_func (monitor, + account_enabled_cb, obj); + g_signal_handlers_disconnect_by_func (monitor, + account_changed_cb, obj); } static void @@ -356,6 +371,8 @@ do_finalize (GObject *obj) G_CALLBACK (account_status_changed_cb), obj); + disconnect_monitor_signals (priv->monitor, obj); + g_object_unref (priv->monitor); g_object_unref (priv->mc); diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c index 315ea2c7a..2e50a53bd 100644 --- a/libempathy/empathy-contact-manager.c +++ b/libempathy/empathy-contact-manager.c @@ -185,7 +185,12 @@ contact_manager_finalize (GObject *object) contact_manager_disconnect_foreach, object); g_hash_table_destroy (priv->lists); + + g_signal_handlers_disconnect_by_func (priv->account_manager, + contact_manager_connection_changed_cb, + object); g_object_unref (priv->account_manager); + g_object_unref (priv->contact_monitor); } |