diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-02-18 18:25:56 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-04-22 18:21:12 +0800 |
commit | 3ef84ad2da98454cae8241e24a6a605c77e31830 (patch) | |
tree | a8b9bf0582a41dffe503ed58c84ca709fc5617df /libempathy | |
parent | 8240abb5ca8ef41aa7e7771d04eb46324fca55f5 (diff) | |
download | gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar.gz gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar.bz2 gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar.lz gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar.xz gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.tar.zst gsoc2013-empathy-3ef84ad2da98454cae8241e24a6a605c77e31830.zip |
- Fix connection of "group-members-changed" signal
- Do not unerf channel when calling close. Wait for it to be invalidated becasue we can still get signals between the
moment we called close and the CM actually closing the channel.
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-chat.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index b9b731384..8bb6567dc 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -101,9 +101,6 @@ tp_chat_invalidated_cb (TpProxy *proxy, DEBUG ("Channel invalidated: %s", message); g_signal_emit (chat, signals[DESTROY], 0); - - g_object_unref (priv->channel); - priv->channel = NULL; } static void @@ -881,7 +878,7 @@ tp_chat_group_members_changed_cb (TpChannel *self, if (handle == g_array_index (removed, TpHandle, i)) { priv->members = g_list_delete_link (priv->members, l); g_signal_emit_by_name (chat, "members-changed", - contact, actor, reason, + contact, NULL, reason, message, FALSE); g_object_unref (contact); break; @@ -988,7 +985,7 @@ tp_chat_constructor (GType type, handles->len, (TpHandle*) handles->data, tp_chat_got_added_contacts_cb, NULL, NULL, chat); - g_signal_connect_swapped (priv->channel, "group-members-changed", + g_signal_connect (priv->channel, "group-members-changed", G_CALLBACK (tp_chat_group_members_changed_cb), chat); } else { /* Get the self contact from the connection's self handle */ @@ -1187,17 +1184,9 @@ empathy_tp_chat_close (EmpathyTpChat *chat) { EmpathyTpChatPriv *priv = GET_PRIV (chat); /* If there are still messages left, it'll come back.. - We loose the ordering of sent messages though */ - g_signal_handlers_disconnect_by_func (priv->channel, - tp_chat_invalidated_cb, chat); - + * We loose the ordering of sent messages though */ tp_cli_channel_call_close (priv->channel, -1, tp_chat_async_cb, "closing channel", NULL, NULL); - - g_object_unref (priv->channel); - priv->channel = NULL; - - g_signal_emit (chat, signals[DESTROY], 0); } const gchar * |