diff options
author | Will Thompson <will@willthompson.co.uk> | 2012-01-18 23:54:48 +0800 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2012-01-19 01:47:25 +0800 |
commit | 3030fa4e082c695fa25b564e513307f3423feaae (patch) | |
tree | 3d2795a6a2662a708cfad2a83165000e78640b76 /libempathy-gtk/empathy-theme-irc.c | |
parent | aded85c91fb409bafb06492ddb85aa1224178d4c (diff) | |
download | gsoc2013-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-theme-irc.c')
-rw-r--r-- | libempathy-gtk/empathy-theme-irc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-theme-irc.c b/libempathy-gtk/empathy-theme-irc.c index 2ee81a23e..ed8e3b380 100644 --- a/libempathy-gtk/empathy-theme-irc.c +++ b/libempathy-gtk/empathy-theme-irc.c @@ -50,7 +50,8 @@ theme_irc_create_tags (EmpathyThemeIrc *theme) static void theme_irc_append_message (EmpathyChatTextView *view, - EmpathyMessage *message) + EmpathyMessage *message, + gboolean should_highlight) { GtkTextBuffer *buffer; const gchar *name; @@ -77,7 +78,7 @@ theme_irc_append_message (EmpathyChatTextView *view, if (empathy_contact_is_user (contact)) { nick_tag = EMPATHY_THEME_IRC_TAG_NICK_SELF; } else { - if (empathy_message_should_highlight (message)) { + if (should_highlight) { nick_tag = EMPATHY_THEME_IRC_TAG_NICK_HIGHLIGHT; } else { nick_tag = EMPATHY_THEME_IRC_TAG_NICK_OTHER; |