GNOME Bugzilla – Bug 658821
Use a stable colour for the local user's messages
Last modified: 2011-09-13 08:47:21 UTC
Empathy picks values for the %senderColor% field based on a hash of the identifier of the contact: } else if (theme_adium_match (&cur, "%senderColor%")) { if (contact_id != NULL) { guint hash = g_str_hash (contact_id); replace = colors[hash % G_N_ELEMENTS (colors)]; } where 'colors' is a big list o' colour names, as illustrated by <http://willthompson.co.uk/misc/colours.html>. Since my contact identifier is different on each of my different accounts, I show up in a different colour in each tab. It might be nice for this to be consistent. We could, for instance, always choose the theme's standard foreground colour by substituting the string "inherit"; or we could reserve one of these colours always to be used for the local user; or we could base it on a hash of the user's Unix username. The first is the simplest. :)
Created attachment 196269 [details] [review] theme-adium: ensure we always use the same color when sending messages
Review of attachment 196269 [details] [review]: ::: libempathy-gtk/empathy-theme-adium.c @@ +578,3 @@ + * (bgo #658821) */ + if (outgoing) + to_hash = "inherit"; Don't hash "inherit"... use it as the colour name.
Created attachment 196339 [details] [review] theme-adium: ensure we always use the same color when sending messages
Attachment 196339 [details] pushed as 2a85625 - theme-adium: ensure we always use the same color when sending messages