[empathy] theme-adium: remove focus marks as soon as the chat is not focused (#649890)



commit ca3669ada0014c82b11a89921a4c38dee9296f13
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed May 11 11:47:56 2011 +0200

    theme-adium: remove focus marks as soon as the chat is not focused (#649890)

 libempathy-gtk/empathy-theme-adium.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 0d3f9a7..efc945a 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -721,10 +721,6 @@ theme_adium_append_message (EmpathyChatView *view,
 	message_classes = g_string_new ("message");
 	if (!priv->has_focus && !is_backlog) {
 		if (!priv->has_unread_message) {
-			/* This is the first message we receive since we lost
-			 * focus; remove previous unread marks. */
-			theme_adium_remove_focus_marks (theme);
-
 			g_string_append (message_classes, " firstFocus");
 			priv->has_unread_message = TRUE;
 		}
@@ -925,12 +921,16 @@ static void
 theme_adium_focus_toggled (EmpathyChatView *view,
 			   gboolean         has_focus)
 {
+	EmpathyThemeAdium *self = (EmpathyThemeAdium *) view;
 	EmpathyThemeAdiumPriv *priv = GET_PRIV (view);
 
 	priv->has_focus = has_focus;
 	if (priv->has_focus) {
 		priv->has_unread_message = FALSE;
 	}
+	else {
+		theme_adium_remove_focus_marks (self);
+	}
 }
 
 static void



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