[empathy/gnome-2-26] Fix urgency hint for MUCs



commit 5b45aec273330423b0cf8867b816cd2e7aaba15c
Author: Xavier Claessens <xclaesse gmail com>
Date:   Fri Apr 17 14:50:06 2009 +0200

    Fix urgency hint for MUCs
---
 src/empathy-chat-window.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index d7c1a39..90ebe41 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -957,7 +957,13 @@ chat_window_new_message_cb (EmpathyChat       *chat,
 		return;
 	}
 	
-	if (empathy_chat_get_members_count (chat) > 2) {
+	/* If empathy_chat_is_room() returns TRUE, that means it's a named MUC.
+	 * If empathy_chat_get_remote_contact() returns NULL, that means it's
+	 * an unamed MUC (msn-like).
+	 * In case of a MUC, we set urgency only if the message contains our
+	 * alias. */
+	if (empathy_chat_is_room (chat) ||
+	    empathy_chat_get_remote_contact (chat) == NULL) {
 		needs_urgency = empathy_message_should_highlight (message);
 	} else {
 		needs_urgency = TRUE;



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