[gnome-contacts] Use folks PresenceDetail get_default_message_from_type. Remove presence_to_string.



commit 14c94fca74e35247a370be0956743d6eb5783e63
Author: Jeremy Whiting <jpwhiting kde org>
Date:   Thu May 24 14:47:22 2012 -0600

    Use folks PresenceDetail get_default_message_from_type. Remove presence_to_string.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676777

 src/contacts-contact.vala |   26 +-------------------------
 1 files changed, 1 insertions(+), 25 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 36cf1e0..0bcfbae 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -63,7 +63,7 @@ public class Contacts.ContactPresence : Grid {
     label.show ();
     phone_image.show ();
     if (message.length == 0)
-      message = Contact.presence_to_string (type);
+      message = PresenceDetails.get_default_message_from_type (type);
 
     label.set_markup (Markup.printf_escaped ("<span font='11px'>%s</span>", message));
     label.set_margin_bottom (3);
@@ -465,30 +465,6 @@ public class Contacts.Contact : GLib.Object  {
     return true;
   }
 
-  public static string presence_to_string (PresenceType presence) {
-    switch (presence) {
-    default:
-    case PresenceType.UNKNOWN:
-      return _("Unknown status");
-    case PresenceType.OFFLINE:
-      return _("Offline");
-    case PresenceType.UNSET:
-      return "";
-    case PresenceType.ERROR:
-      return _("Error");
-    case PresenceType.AVAILABLE:
-      return _("Available");
-    case PresenceType.AWAY:
-      return _("Away");
-    case PresenceType.EXTENDED_AWAY:
-      return _("Extended away");
-    case PresenceType.BUSY:
-      return _("Busy");
-    case PresenceType.HIDDEN:
-      return _("Hidden");
-    }
-  }
-
   public static string presence_to_icon_symbolic (PresenceType presence) {
     string? iconname = null;
     switch (presence) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]