From 58eb907bdecf2752a0e9ae190b4764b4b7b7c537 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Sep 2013 19:10:00 +0100 Subject: [PATCH 2/4] TpAccount: if synthesizing icon name from protocol name, s/_/-/ Freedesktop icon names conventionally look-like-this, but we've changed the definition of a protocol name in 1.0 so it looks_like_this. --- telepathy-glib/account.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 8ca826f..b32e85d 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -862,9 +862,14 @@ _tp_account_update (TpAccount *account, icon_name = tp_asv_get_string (properties, "Icon"); if (tp_str_empty (icon_name)) - priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name); + { + priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name); + g_strdelimit (priv->icon_name, "_", "-"); + } else - priv->icon_name = g_strdup (icon_name); + { + priv->icon_name = g_strdup (icon_name); + } if (tp_strdiff (old, priv->icon_name)) g_object_notify (G_OBJECT (account), "icon-name"); @@ -1099,6 +1104,7 @@ _tp_account_constructed (GObject *object) &(priv->cm_name), &(priv->proto_name), NULL, NULL); priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name); + g_strdelimit (priv->icon_name, "_", "-"); priv->service = g_strdup (priv->proto_name); g_signal_connect (self, "invalidated", -- 1.8.4.rc3