summaryrefslogtreecommitdiff
path: root/src/contacts-contact.vala
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2017-12-29 02:46:30 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2017-12-29 02:46:30 +0100
commita03654fc0628b8324eb9efa855d55971388f6ee0 (patch)
tree521cdbc76d0a11b3c5c97682b59a123784b5d630 /src/contacts-contact.vala
parenta2467c5d827021986fca46620008bafa46f3b793 (diff)
downloadgnome-contacts-a03654fc0628b8324eb9efa855d55971388f6ee0.tar.gz
ContactsContact: remove unused ImDisplay enum
Diffstat (limited to 'src/contacts-contact.vala')
-rw-r--r--src/contacts-contact.vala24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index bdc01f7..e2ac68b 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -345,22 +345,16 @@ public class Contacts.Contact : GLib.Object {
return null;
}
- public enum ImDisplay {
- DEFAULT, /* $id ($service) */
- ALIAS_SERVICE /* $alias ($service) */
- }
-
private struct ImData {
unowned string service;
unowned string display_name;
- ImDisplay display;
}
- public static string format_im_service (string service, out ImDisplay display) {
+ public static string format_im_service (string service) {
const ImData[] data = {
{ "google-talk", N_("Google Talk") },
{ "ovi-chat", N_("Ovi Chat") },
- { "facebook", N_("Facebook"), ImDisplay.ALIAS_SERVICE },
+ { "facebook", N_("Facebook") },
{ "lj-talk", N_("Livejournal") },
{ "aim", N_("AOL Instant Messenger") },
{ "gadugadu", N_("Gadu-Gadu") },
@@ -385,14 +379,10 @@ public class Contacts.Contact : GLib.Object {
{ "zephyr", N_("Zephyr")}
};
- foreach (var d in data) {
- if (d.service == service) {
- display = d.display;
- return dgettext (Config.GETTEXT_PACKAGE, d.display_name);
- }
- }
+ foreach (var d in data)
+ if (d.service == service)
+ return dgettext (Config.GETTEXT_PACKAGE, d.display_name);
- display = ImDisplay.DEFAULT;
return service;
}
@@ -696,7 +686,7 @@ public class Contacts.Contact : GLib.Object {
}
if (store.type_id == "telepathy") {
var account = (store as Tpf.PersonaStore).account;
- return format_im_service (account.service, null);
+ return format_im_service (account.service);
}
return store.display_name;
@@ -789,7 +779,7 @@ public class Contacts.Contact : GLib.Object {
}
if (store.type_id == "telepathy") {
var account = (store as Tpf.PersonaStore).account;
- return format_im_service (account.service, null);
+ return format_im_service (account.service);
}
return store.display_name;