aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-preferences.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 /src/empathy-preferences.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 'src/empathy-preferences.c')
-rw-r--r--src/empathy-preferences.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index 6775d4a24..cd755a9ae 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -678,7 +678,8 @@ static void
preferences_preview_theme_append_message (EmpathyChatView *view,
EmpathyContact *sender,
EmpathyContact *receiver,
- const gchar *text)
+ const gchar *text,
+ gboolean should_highlight)
{
EmpathyMessage *message;
@@ -688,7 +689,7 @@ preferences_preview_theme_append_message (EmpathyChatView *view,
"body", text,
NULL);
- empathy_chat_view_append_message (view, message);
+ empathy_chat_view_append_message (view, message, should_highlight);
g_object_unref (message);
}
@@ -735,19 +736,20 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
preferences_preview_theme_append_message (priv->chat_theme_preview,
/* translators: Quote from Romeo & Julier, for chat theme preview */
- juliet, romeo, _("O Romeo, Romeo, wherefore art thou Romeo?"));
+ juliet, romeo, _("O Romeo, Romeo, wherefore art thou Romeo?"),
+ TRUE /* this message mentions Romeo */);
preferences_preview_theme_append_message (priv->chat_theme_preview,
/* translators: Quote from Romeo & Julier, for chat theme preview */
- juliet, romeo, _("Deny thy father and refuse thy name;"));
+ juliet, romeo, _("Deny thy father and refuse thy name;"), FALSE);
preferences_preview_theme_append_message (priv->chat_theme_preview,
/* translators: Quote from Romeo & Julier, for chat theme preview */
- juliet, romeo, _("Or if thou wilt not, be but sworn my love"));
+ juliet, romeo, _("Or if thou wilt not, be but sworn my love"), FALSE);
preferences_preview_theme_append_message (priv->chat_theme_preview,
/* translators: Quote from Romeo & Julier, for chat theme preview */
- juliet, romeo, _("And I'll no longer be a Capulet."));
+ juliet, romeo, _("And I'll no longer be a Capulet."), FALSE);
preferences_preview_theme_append_message (priv->chat_theme_preview,
/* translators: Quote from Romeo & Julier, for chat theme preview */
- romeo, juliet, _("Shall I hear more, or shall I speak at this?"));
+ romeo, juliet, _("Shall I hear more, or shall I speak at this?"), FALSE);
/* translators: Quote from Romeo & Julier, for chat theme preview */
empathy_chat_view_append_event (priv->chat_theme_preview, _("Juliet has disconnected"));