aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index db35e94dd..028a24dd1 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -364,3 +364,33 @@ empathy_type_dbus_ao (void)
return t;
}
+
+const char *
+empathy_protocol_name_to_display_name (const gchar *proto_name)
+{
+ int i;
+ static struct {
+ const gchar *proto;
+ const gchar *display;
+ } names[] = {
+ { "jabber", "Jabber" },
+ { "msn", "MSN" },
+ { "local-xmpp", N_("People Nearby") },
+ { "irc", "IRC" },
+ { "icq", "ICQ" },
+ { "aim", "AIM" },
+ { "yahoo", "Yahoo!" },
+ { "groupwise", "GroupWise" },
+ { "sip", "SIP" },
+ { NULL, NULL }
+ };
+
+ for (i = 0; names[i].proto != NULL; i++)
+ {
+ if (!tp_strdiff (proto_name, names[i].proto))
+ return names[i].display;
+ }
+
+ return NULL;
+}
+