aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.c3
-rw-r--r--libempathy/empathy-account.c2
-rw-r--r--libempathy/empathy-utils.c6
-rw-r--r--libempathy/empathy-utils.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index ebb198455..c17dfc526 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -134,8 +134,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
gchar *icon_name;
gchar *display_name;
-
- icon_name = g_strdup_printf ("im-%s", proto->name);
+ icon_name = empathy_protocol_icon_name (proto->name);
if (!tp_strdiff (cm->name, "haze"))
display_name = g_strdup_printf ("%s (Haze)", proto->name);
diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c
index cc982aea7..db2ca1f56 100644
--- a/libempathy/empathy-account.c
+++ b/libempathy/empathy-account.c
@@ -467,7 +467,7 @@ empathy_account_constructed (GObject *object)
empathy_account_parse_unique_name (priv->unique_name,
&(priv->proto_name), &(priv->cm_name));
- priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name);
+ priv->icon_name = empathy_protocol_icon_name (priv->proto_name);
tp_cli_account_connect_to_account_property_changed (priv->account,
empathy_account_properties_changed,
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 525f2fe06..fe54ce85a 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -363,6 +363,12 @@ empathy_uint_compare (gconstpointer a,
return *(guint *) a - *(guint *) b;
}
+gchar *
+empathy_protocol_icon_name (const gchar *protocol)
+{
+ return g_strdup_printf ("im-%s", protocol);
+}
+
GType
empathy_type_dbus_ao (void)
{
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 3de6047f4..59ea15403 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -77,6 +77,8 @@ gboolean empathy_check_available_state (void);
gint empathy_uint_compare (gconstpointer a,
gconstpointer b);
+gchar *empathy_protocol_icon_name (const gchar *protocol);
+
#define EMPATHY_ARRAY_TYPE_OBJECT (empathy_type_dbus_ao ())
GType empathy_type_dbus_ao (void);