aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:47:57 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:47:57 +0800
commita7da89d2a228975ee1c2df2c0aa0206123692c32 (patch)
tree037e4b382df70ed1659928c1456e06eb1d510bec /libempathy-gtk
parentf3571f23063cebdea9e7c3fb0fa91e40c82cdaca (diff)
downloadgsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar.gz
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar.bz2
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar.lz
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar.xz
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.tar.zst
gsoc2013-empathy-a7da89d2a228975ee1c2df2c0aa0206123692c32.zip
Always disconnect signals for safety on _finalize ().
svn path=/trunk/; revision=2062
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c3
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c27
2 files changed, 30 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 35b91f876..606eb3d18 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1392,6 +1392,9 @@ chat_finalize (GObject *object)
chat_composing_remove_timeout (chat);
+ g_signal_handlers_disconnect_by_func (priv->account_manager,
+ chat_connection_changed_cb, object);
+
g_object_unref (priv->account_manager);
g_object_unref (priv->log_manager);
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 38a7aeaad..dba27df53 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -143,6 +143,8 @@ static gboolean contact_list_store_update_list_mode_foreach (GtkTreeMod
GtkTreeIter *iter,
EmpathyContactListStore *store);
static gboolean contact_list_store_iface_setup (gpointer user_data);
+static void disconnect_monitor_signals (EmpathyContactMonitor *monitor,
+ GObject *obj);
enum {
PROP_0,
@@ -249,6 +251,10 @@ static void
contact_list_store_finalize (GObject *object)
{
EmpathyContactListStorePriv *priv = GET_PRIV (object);
+ EmpathyContactMonitor *monitor;
+
+ monitor = empathy_contact_list_get_monitor (priv->list);
+ disconnect_monitor_signals (monitor, object);
g_signal_handlers_disconnect_by_func (priv->list,
G_CALLBACK (contact_list_store_groups_changed_cb),
@@ -1067,6 +1073,27 @@ contact_monitor_contact_removed_cb (EmpathyContactMonitor *monitor,
contact_list_store_remove_contact (store, contact);
}
+
+static void
+disconnect_monitor_signals (EmpathyContactMonitor *monitor,
+ GObject *obj)
+{
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_avatar_changed_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_capabilities_changed_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_contact_added_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_contact_removed_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_name_changed_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_presence_changed_cb, obj);
+ g_signal_handlers_disconnect_by_func (monitor,
+ contact_monitor_presence_message_changed_cb, obj);
+}
+
static gboolean
contact_list_store_iface_setup (gpointer user_data)
{