]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-ui-utils.c
Remove EmpathyPresence object and have "presence" and "presence-message" properties...
[empathy.git] / libempathy-gtk / empathy-ui-utils.c
index 22a5fc2f739ac04eaef2abd8db6cf6f66bb66e2b..0b29232bcfb661a1a8c2c078e15762cd96456525 100644 (file)
@@ -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:
@@ -243,33 +243,16 @@ empathy_icon_name_for_presence_state (McPresence state)
        return NULL;
 }
 
-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 *