aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-05 17:43:50 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-05 17:48:12 +0800
commitddcb104dfa874375ea17cac4de2f273af7327fc4 (patch)
tree7e825a21332c56d456c866de3dc23983eb83ebfb /libempathy
parent6294f9870191ddc0f8a357907d17ac776ef511ca (diff)
downloadgsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar.gz
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar.bz2
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar.lz
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar.xz
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.tar.zst
gsoc2013-empathy-ddcb104dfa874375ea17cac4de2f273af7327fc4.zip
Get the icon name from the account object directly
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account.c11
-rw-r--r--libempathy/empathy-account.h1
2 files changed, 12 insertions, 0 deletions
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);