[next] telepathy-glib: TpAccount: if synthesizing icon name from protocol name, s/_/-/
Simon McVittie
smcv at kemper.freedesktop.org
Fri Sep 27 06:23:45 PDT 2013
Module: telepathy-glib
Branch: next
Commit: 7bd2b3d16cb4972708912d75dc396c62d76f74a6
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=7bd2b3d16cb4972708912d75dc396c62d76f74a6
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Thu Sep 26 19:10:00 2013 +0100
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69855
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
telepathy-glib/account.c | 10 ++++++++--
1 files 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",
More information about the telepathy-commits
mailing list