[empathy] call empathy_chat_messages_read when messages have been read in a tab



commit 06dc17735c9966d9b2ecab4f0257bfa9c2eb1742
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Nov 25 17:03:52 2009 +0000

    call empathy_chat_messages_read when messages have been read in a tab

 src/empathy-chat-window.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index e33092a..818fc2a 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1138,6 +1138,9 @@ chat_window_new_message_cb (EmpathyChat       *chat,
 	}
 
 	if (has_focus && priv->current_chat == chat) {
+		/* window and tab are focused so consider than the message is
+		 * read */
+		empathy_chat_messages_read (chat);
 		return;
 	}
 
@@ -1224,6 +1227,7 @@ chat_window_page_switched_cb (GtkNotebook      *notebook,
 
 	priv->current_chat = chat;
 	priv->chats_new_msg = g_list_remove (priv->chats_new_msg, chat);
+	empathy_chat_messages_read (chat);
 
 	chat_window_update_chat_tab (chat);
 }
@@ -1315,6 +1319,7 @@ chat_window_page_removed_cb (GtkNotebook      *notebook,
 	/* Keep list of chats up to date */
 	priv->chats = g_list_remove (priv->chats, chat);
 	priv->chats_new_msg = g_list_remove (priv->chats_new_msg, chat);
+	empathy_chat_messages_read (chat);
 	priv->chats_composing = g_list_remove (priv->chats_composing, chat);
 
 	if (priv->chats == NULL) {
@@ -1336,6 +1341,7 @@ chat_window_focus_in_event_cb (GtkWidget        *widget,
 	priv = GET_PRIV (window);
 
 	priv->chats_new_msg = g_list_remove (priv->chats_new_msg, priv->current_chat);
+	empathy_chat_messages_read (priv->current_chat);
 
 	chat_window_set_urgency_hint (window, FALSE);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]