From ca3669ada0014c82b11a89921a4c38dee9296f13 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 11 May 2011 11:47:56 +0200 Subject: theme-adium: remove focus marks as soon as the chat is not focused (#649890) --- libempathy-gtk/empathy-theme-adium.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 0d3f9a718..efc945a5c 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 -- cgit v1.2.3