diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2009-07-31 17:44:35 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-07-31 17:46:42 +0800 |
commit | 0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d (patch) | |
tree | f942e691af02f8429f4c45b3c8310372b24e0a55 /libempathy/empathy-account-settings.c | |
parent | 8d2d494e21dd76251ce3fff3301bf007eb514f53 (diff) | |
download | gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.gz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.bz2 gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.lz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.xz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.zst gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.zip |
Make protocol icons work also with account == NULL
Diffstat (limited to 'libempathy/empathy-account-settings.c')
-rw-r--r-- | libempathy/empathy-account-settings.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |