aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-01-25 00:33:33 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-01-25 00:33:33 +0800
commita687b7c513d3bb967781f17dc5d247161bcffd8c (patch)
tree116b335b3c4fe96ddd09c64e9aa382516168af03 /libempathy-gtk/empathy-ui-utils.c
parentff21a5f6bfedae8ca32ac871ccad5c106e831b28 (diff)
downloadgsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.gz
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.bz2
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.lz
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.xz
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.zst
gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.zip
Remove EmpathyPresence object and have "presence" and "presence-message" properties directly in EmpathyContact
svn path=/trunk/; revision=601
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 22a5fc2f7..0b29232bc 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -220,9 +220,9 @@ empathy_icon_name_from_account (McAccount *account)
}
const gchar *
-empathy_icon_name_for_presence_state (McPresence state)
+empathy_icon_name_for_presence (McPresence presence)
{
- switch (state) {
+ switch (presence) {
case MC_PRESENCE_AVAILABLE:
return EMPATHY_IMAGE_AVAILABLE;
case MC_PRESENCE_DO_NOT_DISTURB:
@@ -244,32 +244,15 @@ empathy_icon_name_for_presence_state (McPresence state)
}
const gchar *
-empathy_icon_name_for_presence (EmpathyPresence *presence)
-{
- McPresence state;
-
- g_return_val_if_fail (EMPATHY_IS_PRESENCE (presence),
- EMPATHY_IMAGE_OFFLINE);
-
- state = empathy_presence_get_state (presence);
-
- return empathy_icon_name_for_presence_state (state);
-}
-
-const gchar *
empathy_icon_name_for_contact (EmpathyContact *contact)
{
- EmpathyPresence *presence;
+ McPresence presence;
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact),
EMPATHY_IMAGE_OFFLINE);
presence = empathy_contact_get_presence (contact);
- if (presence) {
- return empathy_icon_name_for_presence (presence);
- }
-
- return EMPATHY_IMAGE_UNKNOWN;
+ return empathy_icon_name_for_presence (presence);
}
GdkPixbuf *