diff options
author | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-07-08 04:41:45 +0800 |
---|---|---|
committer | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-07-08 04:41:45 +0800 |
commit | 1fa4ff24ff51c9645e36880c244287f4000175e7 (patch) | |
tree | d7ecfb540e5f055baa758e204a31fdea610c0774 /libempathy | |
parent | 0bf023b7ce4b7acceeaeacd7cb2cec01d16ffcdf (diff) | |
download | gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar.gz gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar.bz2 gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar.lz gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar.xz gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.tar.zst gsoc2013-empathy-1fa4ff24ff51c9645e36880c244287f4000175e7.zip |
Add some comments to the message queue code
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1204 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-chat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 20c9d8f67..534fa5275 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -292,8 +292,9 @@ tp_chat_sender_ready_notify_cb (EmpathyContact *contact, gboolean removed = FALSE; /* Emit all messages queued until we find a message with not - * ready sender. When leaving this loop, sender is the first not ready - * contact queued and removed tells if at least one message got removed + * ready sender (in case of a MUC we could have more than one sender). + * When leaving this loop, sender is the first not ready contact queued + * and removed tells if at least one message got removed * from the queue. */ while (priv->message_queue) { message = priv->message_queue->data; @@ -314,11 +315,15 @@ tp_chat_sender_ready_notify_cb (EmpathyContact *contact, } if (removed) { + /* We removed at least one message from the queue, disconnect + * the ready signal from the previous contact */ g_signal_handlers_disconnect_by_func (contact, tp_chat_sender_ready_notify_cb, chat); if (priv->message_queue) { + /* We still have queued message, connect the ready + * signal on the new first message sender. */ g_signal_connect (sender, "notify::ready", G_CALLBACK (tp_chat_sender_ready_notify_cb), chat); |