aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-text-view.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-text-view.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-text-view.c')
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index c251f1f42..60d642ccb 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -717,7 +717,8 @@ chat_text_view_scroll_down (EmpathyChatView *view)
static void
chat_text_view_append_message (EmpathyChatView *view,
- EmpathyMessage *msg)
+ EmpathyMessage *msg,
+ gboolean should_highlight)
{
EmpathyChatTextView *text_view = EMPATHY_CHAT_TEXT_VIEW (view);
EmpathyChatTextViewPriv *priv = GET_PRIV (text_view);
@@ -739,7 +740,8 @@ chat_text_view_append_message (EmpathyChatView *view,
chat_text_maybe_append_date_and_time (text_view, timestamp);
if (EMPATHY_CHAT_TEXT_VIEW_GET_CLASS (view)->append_message) {
EMPATHY_CHAT_TEXT_VIEW_GET_CLASS (view)->append_message (text_view,
- msg);
+ msg,
+ should_highlight);
}
if (bottom) {