aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-18 23:54:48 +0800
committerWill Thompson <will@willthompson.co.uk>2012-01-19 01:47:25 +0800
commit3030fa4e082c695fa25b564e513307f3423feaae (patch)
tree3d2795a6a2662a708cfad2a83165000e78640b76 /libempathy-gtk/empathy-chat.c
parentaded85c91fb409bafb06492ddb85aa1224178d4c (diff)
downloadgsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar.gz
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar.bz2
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar.lz
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar.xz
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.tar.zst
gsoc2013-empathy-3030fa4e082c695fa25b564e513307f3423feaae.zip
chat_view_append_message: take a should_highlight argument
Rather than the EmpathyChatView implementations calling empathy_message_should_highlight() themselves, this patch makes EmpathyChat take responsibility for doing so. The theme preview in Preferences, whether deliberately or otherwise, highlights the line in which Juliet mentions Romeo. This behaviour is preserved.
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 1496f582d..c8ef24809 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1400,12 +1400,13 @@ chat_message_received (EmpathyChat *chat,
empathy_chat_view_edit_message (chat->view, message);
} else {
+ gboolean should_highlight = empathy_message_should_highlight (message);
DEBUG ("Appending new message '%s' from %s (%d)",
empathy_message_get_token (message),
empathy_contact_get_alias (sender),
empathy_contact_get_handle (sender));
- empathy_chat_view_append_message (chat->view, message);
+ empathy_chat_view_append_message (chat->view, message, should_highlight);
if (empathy_message_is_incoming (message)) {
priv->unread_messages++;
@@ -2491,13 +2492,15 @@ got_filtered_messages_cb (GObject *manager,
"sender", empathy_message_get_sender (message),
NULL);
- empathy_chat_view_append_message (chat->view, syn_msg);
+ empathy_chat_view_append_message (chat->view, syn_msg,
+ empathy_message_should_highlight (syn_msg));
empathy_chat_view_edit_message (chat->view, message);
g_object_unref (syn_msg);
} else {
/* append the latest message */
- empathy_chat_view_append_message (chat->view, message);
+ empathy_chat_view_append_message (chat->view, message,
+ empathy_message_should_highlight (message));
}
g_object_unref (message);