aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-account-chooser.c2
-rw-r--r--libempathy-gtk/empathy-log-window.c2
-rw-r--r--libempathy-gtk/empathy-ui-utils.c10
-rw-r--r--libempathy-gtk/empathy-ui-utils.h1
-rw-r--r--libempathy/empathy-account.c11
-rw-r--r--libempathy/empathy-account.h1
-rw-r--r--src/empathy-accounts-dialog.c2
7 files changed, 15 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 7dccb2179..719cc76c2 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -610,7 +610,7 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
COL_ACCOUNT_POINTER, &account,
-1);
- icon_name = empathy_icon_name_from_account (account);
+ icon_name = empathy_account_get_icon_name (account);
if (priv->filter) {
is_enabled = priv->filter (account, priv->filter_data);
}
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index f05017c9c..7add30136 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -419,7 +419,7 @@ log_window_find_populate (EmpathyLogWindow *window,
date_readable = empathy_log_manager_get_date_readable (hit->date);
account_name = empathy_account_get_display_name (hit->account);
- account_icon = empathy_icon_name_from_account (hit->account);
+ account_icon = empathy_account_get_icon_name (hit->account);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 3c8c52746..00e6a0cb2 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -183,16 +183,6 @@ empathy_builder_unref_and_keep_widget (GtkBuilder *gui,
}
const gchar *
-empathy_icon_name_from_account (EmpathyAccount *account)
-{
- McProfile *profile;
-
- profile = empathy_account_get_profile (account);
-
- return mc_profile_get_icon_name (profile);
-}
-
-const gchar *
empathy_icon_name_for_presence (TpConnectionPresenceType presence)
{
switch (presence) {
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 10f889b0c..fe676b135 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -59,7 +59,6 @@ GtkWidget *empathy_builder_unref_and_keep_widget (GtkBuilder *gui,
GtkWidget *root);
/* Pixbufs */
-const gchar * empathy_icon_name_from_account (EmpathyAccount *account);
const gchar * empathy_icon_name_for_presence (TpConnectionPresenceType presence);
const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
GdkPixbuf * empathy_pixbuf_from_data (gchar *data,
diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c
index 3bae8f5b5..c6a2184f9 100644
--- a/libempathy/empathy-account.c
+++ b/libempathy/empathy-account.c
@@ -77,6 +77,7 @@ struct _EmpathyAccountPriv
gchar *cm_name;
gchar *proto_name;
+ gchar *icon_name;
};
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccount)
@@ -256,6 +257,7 @@ empathy_account_finalize (GObject *object)
g_free (priv->cm_name);
g_free (priv->proto_name);
+ g_free (priv->icon_name);
/* free any data held directly by the object here */
if (G_OBJECT_CLASS (empathy_account_parent_class)->finalize != NULL)
@@ -349,6 +351,14 @@ empathy_account_get_protocol (EmpathyAccount *account)
return priv->proto_name;
}
+const gchar *
+empathy_account_get_icon_name (EmpathyAccount *account)
+{
+ EmpathyAccountPriv *priv = GET_PRIV (account);
+
+ return priv->icon_name;
+}
+
void
empathy_account_set_enabled (EmpathyAccount *account, gboolean enabled)
{
@@ -460,6 +470,7 @@ _empathy_account_new (McAccount *mc_account)
priv->proto_name = g_strdup (mc_protocol_get_name (protocol));
priv->cm_name = g_strdup (mc_manager_get_unique_name (manager));
+ priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name);
g_object_unref (protocol);
g_object_unref (manager);
diff --git a/libempathy/empathy-account.h b/libempathy/empathy-account.h
index 66141ae9b..95879215c 100644
--- a/libempathy/empathy-account.h
+++ b/libempathy/empathy-account.h
@@ -63,6 +63,7 @@ const gchar *empathy_account_get_display_name (EmpathyAccount *account);
const gchar *empathy_account_get_connection_manager (EmpathyAccount *account);
const gchar *empathy_account_get_protocol (EmpathyAccount *account);
+const gchar *empathy_account_get_icon_name (EmpathyAccount *account);
void empathy_account_set_enabled (EmpathyAccount *account,
gboolean enabled);
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 98e848566..f427b9994 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -466,7 +466,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
COL_ACCOUNT_POINTER, &account,
-1);
- icon_name = empathy_icon_name_from_account (account);
+ icon_name = empathy_account_get_icon_name (account);
pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
if (pixbuf) {