- if (icon_name) {
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon),
- icon_name,
- HILDON_ICON_SIZE_XSMALL);
- gtk_widget_show (priv->icon);
+ if (new_account) {
+ if (g_strcmp0 (priv->local_id, "ring/tel/ring") == 0) {
+ icon_name = "general_sms";
+ }
+ else {
+ McAccount *account;
+ OssoABookAccountManager *am = osso_abook_account_manager_get_default ();
+ if (!osso_abook_waitable_is_ready (OSSO_ABOOK_WAITABLE (am), NULL)) {
+ osso_abook_account_manager_call_when_ready (am,
+ am_ready,
+ self,
+ NULL);
+ }
+ else {
+ account = osso_abook_account_manager_lookup_by_name (NULL,
+ priv->local_id);
+ if (account) {
+ McProfile *profile = mc_profile_lookup (mc_account_compat_get_profile (account));
+ icon_name = mc_profile_get_icon_name (profile);
+ }
+ }
+ }
+
+ if (icon_name) {
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon),
+ icon_name,
+ HILDON_ICON_SIZE_XSMALL);
+ gtk_widget_show (priv->icon);
+ }
+ else
+ gtk_widget_hide (priv->icon);