From d36a313b26e957452fde60cac897791b0f6e4990 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Thu, 12 May 2011 16:47:59 +0100 Subject: chat: make nb_unread_messages incoming only and add a property so it can have change notification. Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index b580812ac..019064a16 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -173,6 +173,7 @@ enum { PROP_SHOW_CONTACTS, PROP_SMS_CHANNEL, PROP_N_MESSAGES_SENDING, + PROP_NB_UNREAD_MESSAGES, }; static guint signals[LAST_SIGNAL] = { 0 }; @@ -219,6 +220,10 @@ chat_get_property (GObject *object, g_value_set_uint (value, empathy_chat_get_n_messages_sending (chat)); break; + case PROP_NB_UNREAD_MESSAGES: + g_value_set_uint (value, + empathy_chat_get_nb_unread_messages (chat)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -1271,7 +1276,10 @@ chat_message_received (EmpathyChat *chat, TP_CHANNEL_CHAT_STATE_ACTIVE, chat); - priv->unread_messages++; + if (empathy_message_is_incoming (message)) { + priv->unread_messages++; + } + g_signal_emit (chat, signals[NEW_MESSAGE], 0, message, pending); } @@ -1283,6 +1291,16 @@ chat_message_received_cb (EmpathyTpChat *tp_chat, chat_message_received (chat, message, FALSE); } +static void +chat_pending_message_removed_cb (EmpathyTpChat *tp_chat, + EmpathyChat *chat) +{ + EmpathyChatPriv *priv = GET_PRIV (chat); + + priv->unread_messages--; + g_object_notify (G_OBJECT (chat), "nb-unread-messages"); +} + static void chat_send_error_cb (EmpathyTpChat *tp_chat, const gchar *message_body, @@ -2871,6 +2889,8 @@ chat_finalize (GObject *object) chat_destroy_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, chat_message_received_cb, chat); + g_signal_handlers_disconnect_by_func (priv->tp_chat, + chat_pending_message_removed_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, chat_send_error_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, @@ -3007,6 +3027,14 @@ empathy_chat_class_init (EmpathyChatClass *klass) 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (object_class, + PROP_NB_UNREAD_MESSAGES, + g_param_spec_uint ("nb-unread-messages", + "Num Unread Messages", + "The number of unread messages", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + signals[COMPOSING] = g_signal_new ("composing", G_OBJECT_CLASS_TYPE (object_class), @@ -3546,6 +3574,9 @@ empathy_chat_set_tp_chat (EmpathyChat *chat, g_signal_connect (tp_chat, "message-received", G_CALLBACK (chat_message_received_cb), chat); + g_signal_connect (tp_chat, "pending-message-removed", + G_CALLBACK (chat_pending_message_removed_cb), + chat); g_signal_connect (tp_chat, "send-error", G_CALLBACK (chat_send_error_cb), chat); @@ -3876,7 +3907,6 @@ empathy_chat_messages_read (EmpathyChat *self) if (priv->tp_chat != NULL ) { empathy_tp_chat_acknowledge_all_messages (priv->tp_chat); } - priv->unread_messages = 0; empathy_chat_view_focus_toggled (self->view, TRUE); } -- cgit v1.2.3 From bd0755be84f285e48272fb0b7ac154bad4be0902 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 11:22:22 +0100 Subject: adium: set x-empathy-message-id class in messageStyles Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-theme-adium.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 06410c528..c947c2897 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -638,6 +638,7 @@ theme_adium_append_message (EmpathyChatView *view, EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view); EmpathyThemeAdiumPriv *priv = GET_PRIV (theme); EmpathyContact *sender; + TpMessage *tp_msg; TpAccount *account; gchar *body_escaped; const gchar *body; @@ -759,6 +760,16 @@ theme_adium_append_message (EmpathyChatView *view, * %status% - See %status% in theme_adium_append_html () */ + /* x-empathy-message-id-* */ + tp_msg = empathy_message_get_tp_message (msg); + if (tp_msg != NULL) { + gchar *tmp = tp_escape_as_identifier ( + tp_message_get_token (tp_msg)); + g_string_append_printf (message_classes, + " x-empathy-message-id-%s", tmp); + g_free (tmp); + } + /* Define javascript function to use */ if (consecutive) { func = priv->allow_scrolling ? "appendNextMessage" : "appendNextMessageNoScroll"; -- cgit v1.2.3 From 5080aa2351deb6abe0aa1cc442fd1175f2eaa70e Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 11:25:06 +0100 Subject: adium: split removing unread markers into two functions Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-theme-adium.c | 60 ++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 26 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index c947c2897..1a213ff91 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -569,32 +569,10 @@ theme_adium_append_event_escaped (EmpathyChatView *view, } static void -theme_adium_remove_focus_marks (EmpathyThemeAdium *theme) +theme_adium_remove_focus_marks (EmpathyThemeAdium *theme, + WebKitDOMNodeList *nodes) { - EmpathyThemeAdiumPriv *priv = GET_PRIV (theme); - WebKitDOMDocument *dom; - WebKitDOMNodeList *nodes; guint i; - GError *error = NULL; - - if (!priv->has_unread_message) - return; - - priv->has_unread_message = FALSE; - - dom = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (theme)); - if (dom == NULL) { - return; - } - - /* Get all nodes with focus class */ - nodes = webkit_dom_document_query_selector_all (dom, ".focus", &error); - if (nodes == NULL) { - DEBUG ("Error getting focus nodes: %s", - error ? error->message : "No error"); - g_clear_error (&error); - return; - } /* Remove focus and firstFocus class */ for (i = 0; i < webkit_dom_node_list_get_length (nodes); i++) { @@ -631,6 +609,36 @@ theme_adium_remove_focus_marks (EmpathyThemeAdium *theme) } } +static void +theme_adium_remove_all_focus_marks (EmpathyThemeAdium *theme) +{ + EmpathyThemeAdiumPriv *priv = GET_PRIV (theme); + WebKitDOMDocument *dom; + WebKitDOMNodeList *nodes; + GError *error = NULL; + + if (!priv->has_unread_message) + return; + + priv->has_unread_message = FALSE; + + dom = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (theme)); + if (dom == NULL) { + return; + } + + /* Get all nodes with focus class */ + nodes = webkit_dom_document_query_selector_all (dom, ".focus", &error); + if (nodes == NULL) { + DEBUG ("Error getting focus nodes: %s", + error ? error->message : "No error"); + g_clear_error (&error); + return; + } + + theme_adium_remove_focus_marks (theme, nodes); +} + static void theme_adium_append_message (EmpathyChatView *view, EmpathyMessage *msg) @@ -788,7 +796,7 @@ theme_adium_append_message (EmpathyChatView *view, } /* remove all the unread marks when we are sending a message */ - theme_adium_remove_focus_marks (theme); + theme_adium_remove_all_focus_marks (theme); } else { /* in */ if (is_backlog) { @@ -946,7 +954,7 @@ theme_adium_focus_toggled (EmpathyChatView *view, priv->has_focus = has_focus; if (!priv->has_focus) { - theme_adium_remove_focus_marks (self); + theme_adium_remove_all_focus_marks (self); } } -- cgit v1.2.3 From 96345c97d9c3fc52b45ef5ce522ef2e4c94bca63 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 11:35:09 +0100 Subject: tp-chat: give ::pending-message-removed the message Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 019064a16..71e56203d 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1293,6 +1293,7 @@ chat_message_received_cb (EmpathyTpChat *tp_chat, static void chat_pending_message_removed_cb (EmpathyTpChat *tp_chat, + EmpathyMessage *message, EmpathyChat *chat) { EmpathyChatPriv *priv = GET_PRIV (chat); -- cgit v1.2.3 From 3329e947496629d8275ad68791d73c49d9fc820f Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 11:35:42 +0100 Subject: chat-view: add message_acknowledged vfunc Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat-view.c | 11 +++++++++++ libempathy-gtk/empathy-chat-view.h | 4 ++++ 2 files changed, 15 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c index 097215cfd..43d89dd78 100644 --- a/libempathy-gtk/empathy-chat-view.c +++ b/libempathy-gtk/empathy-chat-view.c @@ -212,3 +212,14 @@ empathy_chat_view_focus_toggled (EmpathyChatView *view, } } +void +empathy_chat_view_message_acknowledged (EmpathyChatView *view, + EmpathyMessage *message) +{ + g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view)); + + if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->message_acknowledged) { + EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->message_acknowledged (view, message); + } +} + diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h index 1af0721a3..73245c422 100644 --- a/libempathy-gtk/empathy-chat-view.h +++ b/libempathy-gtk/empathy-chat-view.h @@ -70,6 +70,8 @@ struct _EmpathyChatViewIface { void (*copy_clipboard) (EmpathyChatView *view); void (*focus_toggled) (EmpathyChatView *view, gboolean has_focus); + void (*message_acknowledged) (EmpathyChatView *view, + EmpathyMessage *message); }; GType empathy_chat_view_get_type (void) G_GNUC_CONST; @@ -101,6 +103,8 @@ void empathy_chat_view_highlight (EmpathyChatView *view, void empathy_chat_view_copy_clipboard (EmpathyChatView *view); void empathy_chat_view_focus_toggled (EmpathyChatView *view, gboolean has_focus); +void empathy_chat_view_message_acknowledged (EmpathyChatView *view, + EmpathyMessage *message); G_END_DECLS -- cgit v1.2.3 From c68050906fb6a3017ed9162fb14b4dcca78eba0a Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:12:54 +0100 Subject: chat: don't toggle visibility of the chat view on marking messages read It doesn't make sense, and it's a lie. It will also break showing unread message markers in the adium chat view. Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 71e56203d..3a57c8138 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -3905,11 +3905,9 @@ empathy_chat_messages_read (EmpathyChat *self) if (priv->retrieving_backlogs) return; - if (priv->tp_chat != NULL ) { + if (priv->tp_chat != NULL) { empathy_tp_chat_acknowledge_all_messages (priv->tp_chat); } - - empathy_chat_view_focus_toggled (self->view, TRUE); } /* Return TRUE if on of the contacts in this chat is composing */ -- cgit v1.2.3 From bd1d3bc265f617b0aa86bd80da28d64b50dcbbfb Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:14:54 +0100 Subject: adium: implement acknowledge_message to remove unread marker Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-theme-adium.c | 88 +++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 1a213ff91..8b7f88065 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -61,6 +61,9 @@ typedef struct { guint pages_loading; /* Queue of GValue* containing an EmpathyMessage or string */ GQueue message_queue; + /* Queue of owned gchar* of message token to remove unread + * marker for when we lose focus. */ + GQueue acked_messages; GtkWidget *inspector_window; GSettings *gsettings_chat; gboolean has_focus; @@ -945,17 +948,92 @@ theme_adium_copy_clipboard (EmpathyChatView *view) webkit_web_view_copy_clipboard (WEBKIT_WEB_VIEW (view)); } +static void +theme_adium_remove_mark_from_message (EmpathyThemeAdium *self, + const gchar *token) +{ + WebKitDOMDocument *dom; + WebKitDOMNodeList *nodes; + gchar *class, *tmp; + GError *error = NULL; + + dom = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (self)); + if (dom == NULL) { + return; + } + + tmp = tp_escape_as_identifier (token); + class = g_strdup_printf (".x-empathy-message-id-%s", tmp); + g_free (tmp); + + /* Get all nodes with focus class */ + nodes = webkit_dom_document_query_selector_all (dom, class, &error); + g_free (class); + + if (nodes == NULL) { + DEBUG ("Error getting focus nodes: %s", + error ? error->message : "No error"); + g_clear_error (&error); + return; + } + + theme_adium_remove_focus_marks (self, nodes); +} + +static void +theme_adium_remove_acked_message_unread_mark_foreach (gpointer data, + gpointer user_data) +{ + EmpathyThemeAdium *self = user_data; + gchar *token = data; + + theme_adium_remove_mark_from_message (self, token); + g_free (token); +} + 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) { - theme_adium_remove_all_focus_marks (self); + /* We've lost focus, so let's make sure all the acked + * messages have lost their unread marker. */ + g_queue_foreach (&priv->acked_messages, + theme_adium_remove_acked_message_unread_mark_foreach, + view); + g_queue_clear (&priv->acked_messages); + } +} + +static void +theme_adium_message_acknowledged (EmpathyChatView *view, + EmpathyMessage *message) +{ + EmpathyThemeAdium *self = (EmpathyThemeAdium *) view; + EmpathyThemeAdiumPriv *priv = GET_PRIV (view); + TpMessage *tp_msg; + + tp_msg = empathy_message_get_tp_message (message); + + if (tp_msg == NULL) { + return; } + + /* We only want to actually remove the unread marker if the + * view doesn't have focus. If we did it all the time we would + * never see the unread markers, ever! So, we'll queue these + * up, and when we lose focus, we'll remove the markers. */ + if (priv->has_focus) { + g_queue_push_tail (&priv->acked_messages, + g_strdup (tp_message_get_token (tp_msg))); + return; + } + + theme_adium_remove_mark_from_message (self, + tp_message_get_token (tp_msg)); } static void @@ -1078,6 +1156,7 @@ theme_adium_iface_init (EmpathyChatViewIface *iface) iface->highlight = theme_adium_highlight; iface->copy_clipboard = theme_adium_copy_clipboard; iface->focus_toggled = theme_adium_focus_toggled; + iface->message_acknowledged = theme_adium_message_acknowledged; } static void @@ -1143,6 +1222,11 @@ theme_adium_dispose (GObject *object) priv->inspector_window = NULL; } + if (priv->acked_messages.length > 0) { + g_queue_foreach (&priv->acked_messages, (GFunc) g_free, NULL); + g_queue_clear (&priv->acked_messages); + } + G_OBJECT_CLASS (empathy_theme_adium_parent_class)->dispose (object); } -- cgit v1.2.3 From 5af3e568a7048f1de84d9c5372973aeee87aff60 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:15:13 +0100 Subject: chat: call acknowledge_message on the chat view when it happens Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 3a57c8138..09bff03e3 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1298,6 +1298,9 @@ chat_pending_message_removed_cb (EmpathyTpChat *tp_chat, { EmpathyChatPriv *priv = GET_PRIV (chat); + empathy_chat_view_message_acknowledged (chat->view, + message); + priv->unread_messages--; g_object_notify (G_OBJECT (chat), "nb-unread-messages"); } -- cgit v1.2.3 From d44680728465f8bb4da6f6dd50694d04aadd1745 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:16:25 +0100 Subject: chat: ::notify for all changes to unread messages Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 09bff03e3..897127b28 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1278,6 +1278,7 @@ chat_message_received (EmpathyChat *chat, if (empathy_message_is_incoming (message)) { priv->unread_messages++; + g_object_notify (G_OBJECT (chat), "nb-unread-messages"); } g_signal_emit (chat, signals[NEW_MESSAGE], 0, message, pending); -- cgit v1.2.3 From 4d140c3a4e3c4629a72c3bf0ea7ca8b8ee48fb72 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:18:57 +0100 Subject: tp-chat: rename signal to message-acknowledged Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-chat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 897127b28..09698bc72 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1293,9 +1293,9 @@ chat_message_received_cb (EmpathyTpChat *tp_chat, } static void -chat_pending_message_removed_cb (EmpathyTpChat *tp_chat, - EmpathyMessage *message, - EmpathyChat *chat) +chat_message_acknowledged_cb (EmpathyTpChat *tp_chat, + EmpathyMessage *message, + EmpathyChat *chat) { EmpathyChatPriv *priv = GET_PRIV (chat); @@ -2895,7 +2895,7 @@ chat_finalize (GObject *object) g_signal_handlers_disconnect_by_func (priv->tp_chat, chat_message_received_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, - chat_pending_message_removed_cb, chat); + chat_message_acknowledged_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, chat_send_error_cb, chat); g_signal_handlers_disconnect_by_func (priv->tp_chat, @@ -3579,8 +3579,8 @@ empathy_chat_set_tp_chat (EmpathyChat *chat, g_signal_connect (tp_chat, "message-received", G_CALLBACK (chat_message_received_cb), chat); - g_signal_connect (tp_chat, "pending-message-removed", - G_CALLBACK (chat_pending_message_removed_cb), + g_signal_connect (tp_chat, "message_acknowledged", + G_CALLBACK (chat_message_acknowledged_cb), chat); g_signal_connect (tp_chat, "send-error", G_CALLBACK (chat_send_error_cb), -- cgit v1.2.3 From 1c40d3370a1d2e1e98b1609377e0903a2ca40f6f Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 13 May 2011 15:50:38 +0100 Subject: adium: add comment explaining why we add x-empathy-mesage-id-* Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-theme-adium.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 8b7f88065..095d2058e 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -771,7 +771,11 @@ theme_adium_append_message (EmpathyChatView *view, * %status% - See %status% in theme_adium_append_html () */ - /* x-empathy-message-id-* */ + /* This is slightly a hack, but it's the only way to add + * arbitrary data to messages in the HTML. We add another + * class called "x-empathy-message-id-*" to the message. This + * way, we can remove the unread marker for this specific + * message later. */ tp_msg = empathy_message_get_tp_message (msg); if (tp_msg != NULL) { gchar *tmp = tp_escape_as_identifier ( -- cgit v1.2.3 From 9e1914959b7e26e82ca4042ad5f7f042cb5a34a2 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Tue, 17 May 2011 09:33:47 +0100 Subject: adium: set has_unread_message to FALSE when we think we've cleared them all Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-theme-adium.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 095d2058e..b62b017c9 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -1009,6 +1009,8 @@ theme_adium_focus_toggled (EmpathyChatView *view, theme_adium_remove_acked_message_unread_mark_foreach, view); g_queue_clear (&priv->acked_messages); + + priv->has_unread_message = FALSE; } } -- cgit v1.2.3