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 | |
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')
-rw-r--r-- | libempathy/empathy-account-settings.c | 7 | ||||
-rw-r--r-- | libempathy/empathy-account-settings.h | 2 |
2 files changed, 6 insertions, 3 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; } diff --git a/libempathy/empathy-account-settings.h b/libempathy/empathy-account-settings.h index 06e5e69e3..8ae692212 100644 --- a/libempathy/empathy-account-settings.h +++ b/libempathy/empathy-account-settings.h @@ -127,7 +127,7 @@ void empathy_account_settings_set_uint64 (EmpathyAccountSettings *settings, void empathy_account_settings_set_boolean (EmpathyAccountSettings *settings, const gchar *param, gboolean value); -const gchar *empathy_account_settings_get_icon_name ( +gchar *empathy_account_settings_get_icon_name ( EmpathyAccountSettings *settings); const gchar *empathy_account_settings_get_display_name ( |