]> git.0d.be Git - empathy.git/commitdiff
Make empathy_protocol_name_to_display_name public
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 25 Aug 2009 09:50:26 +0000 (11:50 +0200)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 25 Aug 2009 10:55:39 +0000 (11:55 +0100)
libempathy-gtk/empathy-protocol-chooser.c
libempathy/empathy-utils.c
libempathy/empathy-utils.h

index c9dbb40275a5b1982b08a9d12df168393acc7c8b..1b29f7db8717ef8600763b6554993dcdf0e99ca4 100644 (file)
@@ -128,35 +128,6 @@ protocol_chooser_sort_func (GtkTreeModel *model,
   return cmp;
 }
 
-static const char *
-protocol_chooser_proto_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;
-}
-
 static void
 protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
     TpConnectionManager *cm)
@@ -225,7 +196,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
           g_strdup (proto->name), g_strdup (cm->name));
 
       icon_name = empathy_protocol_icon_name (proto->name);
-      display_name = protocol_chooser_proto_name_to_display_name (proto->name);
+      display_name = empathy_protocol_name_to_display_name (proto->name);
 
       if (display_name == NULL)
         display_name = proto->name;
index db35e94dd9f46899ced70c3d7cdb79624b843b7b..028a24dd1e3d6a8d0f6289efc39e2ed5d1e7ff8b 100644 (file)
@@ -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;
+}
+
index c6aebb4f28458589c5ae63efa92c735df6a91a7b..9015b388962cb885928871b52cce437c22b418dc 100644 (file)
@@ -75,6 +75,7 @@ gint        empathy_uint_compare                    (gconstpointer a,
                                                     gconstpointer b);
 
 gchar *empathy_protocol_icon_name (const gchar *protocol);
+const gchar *empathy_protocol_name_to_display_name (const gchar *proto_name);
 
 #define EMPATHY_ARRAY_TYPE_OBJECT (empathy_type_dbus_ao ())
 GType empathy_type_dbus_ao (void);