diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-12 22:58:46 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-13 16:42:08 +0800 |
commit | 2a856251402a5ed06a5f9853b7b26abfcbf5eb3c (patch) | |
tree | 232c4d6196634b52866be85702bc7bd100147d3c | |
parent | 36211fc1a6e977c82e1f6467691a499fe6b68410 (diff) | |
download | gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar.gz gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar.bz2 gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar.lz gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar.xz gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.tar.zst gsoc2013-empathy-2a856251402a5ed06a5f9853b7b26abfcbf5eb3c.zip |
theme-adium: ensure we always use the same color when sending messages
https://bugzilla.gnome.org/show_bug.cgi?id=658821
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 4e32630d5..f81329b79 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -541,7 +541,8 @@ theme_adium_append_html (EmpathyThemeAdium *theme, const gchar *service_name, const gchar *message_classes, gint64 timestamp, - gboolean is_backlog) + gboolean is_backlog, + gboolean outgoing) { EmpathyThemeAdiumPriv *priv = GET_PRIV (theme); GString *string; @@ -571,7 +572,12 @@ theme_adium_append_html (EmpathyThemeAdium *theme, * Incoming/SenderColors.txt it will be used instead of * the default colors. */ - if (contact_id != NULL) { + + /* Ensure we always use the same color when sending messages + * (bgo #658821) */ + if (outgoing) { + replace = "inherit"; + } else if (contact_id != NULL) { guint hash = g_str_hash (contact_id); replace = colors[hash % G_N_ELEMENTS (colors)]; } @@ -687,7 +693,7 @@ theme_adium_append_event_escaped (EmpathyChatView *view, theme_adium_append_html (theme, "appendMessage", priv->data->status_html, escaped, NULL, NULL, NULL, NULL, "event", - empathy_time_get_current (), FALSE); + empathy_time_get_current (), FALSE, FALSE); /* There is no last contact */ if (priv->last_contact) { @@ -944,7 +950,7 @@ theme_adium_append_message (EmpathyChatView *view, theme_adium_append_html (theme, func, html, body_escaped, avatar_filename, name, contact_id, service_name, message_classes->str, - timestamp, is_backlog); + timestamp, is_backlog, empathy_contact_is_user (sender)); /* Keep the sender of the last displayed message */ if (priv->last_contact) { |