diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-20 00:07:48 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-20 00:07:48 +0800 |
commit | 8e549e268287120c56eb2dbc25b9d70dadb895f2 (patch) | |
tree | 4799ba258ca61a98981deaaa0bb2ff2934676dc1 /libempathy-gtk/empathy-presence-chooser.c | |
parent | c98e85dcf635914dc66755d6a8560e2d370cfffe (diff) | |
download | gsoc2013-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-gtk/empathy-presence-chooser.c')
-rw-r--r-- | libempathy-gtk/empathy-presence-chooser.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c index 490ad898a..ba36e091c 100644 --- a/libempathy-gtk/empathy-presence-chooser.c +++ b/libempathy-gtk/empathy-presence-chooser.c @@ -101,6 +101,8 @@ typedef struct { EmpathyIdle *idle; EmpathyConnectivity *connectivity; + gulong state_change_signal_id; + gboolean editing_status; int block_set_editing; int block_changed; @@ -792,7 +794,8 @@ empathy_presence_chooser_init (EmpathyPresenceChooser *chooser) _("Set your presence and current status")); priv->connectivity = empathy_connectivity_dup_singleton (); - g_signal_connect (priv->connectivity, "state-change", + priv->state_change_signal_id = g_signal_connect (priv->connectivity, + "state-change", G_CALLBACK (presence_chooser_connectivity_state_change), chooser); presence_chooser_connectivity_state_change (priv->connectivity, @@ -819,9 +822,9 @@ presence_chooser_finalize (GObject *object) object); g_object_unref (priv->idle); - g_signal_handlers_disconnect_by_func (priv->connectivity, - presence_chooser_connectivity_state_change, - object); + g_signal_handler_disconnect (priv->connectivity, + priv->state_change_signal_id); + priv->state_change_signal_id = 0; g_object_unref (priv->connectivity); |