aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorRobert McQueen <robert.mcqueen@collabora.co.uk>2010-05-15 20:54:18 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-05-15 21:07:49 +0800
commitd06fb95a0ed6337d4897e8f9b0538057dee8c053 (patch)
tree914b5c826e51809ccad486f272b2306af20d86a2 /libempathy-gtk/empathy-ui-utils.c
parent3315956fb2248bcadec5042234b6e3fe869995f1 (diff)
downloadgsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar.gz
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar.bz2
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar.lz
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar.xz
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.tar.zst
gsoc2013-empathy-d06fb95a0ed6337d4897e8f9b0538057dee8c053.zip
use user-extended-away status icon in favour of user-idle
The freedesktop.org icon spec defines that the icon for the extended away status is called user-idle. However, some icon theme authors interpret this name as meaning mere idleness rather than the intended extended away semantic of away *and* idle, creating visual confusion (extended-away contacts appearing less away than contacts who are merely away). Some themes contain a non-standard user-extended-away icon with the correct semantic, so this patch makes Empathy use it in preference to user-idle if available. (Incidentally, at the moment Telepathy itself never actually shows remote contacts as idle.)
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index ff7ed34ed..586eaee16 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -182,7 +182,13 @@ empathy_icon_name_for_presence (TpConnectionPresenceType presence)
case TP_CONNECTION_PRESENCE_TYPE_AWAY:
return EMPATHY_IMAGE_AWAY;
case TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY:
- return EMPATHY_IMAGE_EXT_AWAY;
+ if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (),
+ EMPATHY_IMAGE_EXT_AWAY))
+ return EMPATHY_IMAGE_EXT_AWAY;
+
+ /* The 'extended-away' icon is not an official one so we fallback to idle if
+ * it's not implemented */
+ return EMPATHY_IMAGE_IDLE;
case TP_CONNECTION_PRESENCE_TYPE_HIDDEN:
if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (),
EMPATHY_IMAGE_HIDDEN))