From 0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Fri, 31 Jul 2009 11:44:35 +0200 Subject: Make protocol icons work also with account == NULL --- libempathy/empathy-account-settings.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libempathy/empathy-account-settings.c') diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index 1c5bc719a..256d05ba4 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -447,13 +447,16 @@ empathy_account_settings_get_protocol (EmpathyAccountSettings *settings) return priv->protocol; } -const gchar * +gchar * empathy_account_settings_get_icon_name (EmpathyAccountSettings *settings) { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); if (priv->account != NULL) - return empathy_account_get_icon_name (priv->account); + return g_strdup (empathy_account_get_icon_name (priv->account)); + + if (priv->tp_protocol != NULL) + return g_strdup_printf ("im-%s", priv->tp_protocol->name); return NULL; } -- cgit v1.2.3