aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-20 00:07:48 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-20 00:07:48 +0800
commit8e549e268287120c56eb2dbc25b9d70dadb895f2 (patch)
tree4799ba258ca61a98981deaaa0bb2ff2934676dc1 /libempathy/empathy-idle.c
parentc98e85dcf635914dc66755d6a8560e2d370cfffe (diff)
downloadgsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar.gz
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar.bz2
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar.lz
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar.xz
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.tar.zst
gsoc2013-empathy-8e549e268287120c56eb2dbc25b9d70dadb895f2.zip
all: save the signal id and use that to disconnect from the signal
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index f408cf69b..ac0ca72f6 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -45,6 +45,7 @@ typedef struct {
MissionControl *mc;
DBusGProxy *gs_proxy;
EmpathyConnectivity *connectivity;
+ gulong state_change_signal_id;
TpConnectionPresenceType state;
gchar *status;
@@ -270,8 +271,9 @@ idle_finalize (GObject *object)
g_object_unref (priv->gs_proxy);
}
- g_signal_handlers_disconnect_by_func (priv->connectivity,
- idle_state_change_cb, object);
+ g_signal_handler_disconnect (priv->connectivity,
+ priv->state_change_signal_id);
+ priv->state_change_signal_id = 0;
g_object_unref (priv->connectivity);
@@ -482,8 +484,8 @@ empathy_idle_init (EmpathyIdle *idle)
}
priv->connectivity = empathy_connectivity_dup_singleton ();
- g_signal_connect (priv->connectivity, "state-change",
- G_CALLBACK (idle_state_change_cb), idle);
+ priv->state_change_signal_id = g_signal_connect (priv->connectivity,
+ "state-change", G_CALLBACK (idle_state_change_cb), idle);
}
EmpathyIdle *