aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-09-15 06:27:21 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-09-15 06:29:37 +0800
commit0b235f9223d30ea4a62c692cac65fa509f824635 (patch)
treebedff2df0861038a8b31d582b005448439f58814
parentc1b66fcb4e53cfa4207510541f2144ca605a5d98 (diff)
downloadgsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar.gz
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar.bz2
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar.lz
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar.xz
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.tar.zst
gsoc2013-empathy-0b235f9223d30ea4a62c692cac65fa509f824635.zip
Use : instead of / to seperate account and contact id
-rw-r--r--megaphone/src/megaphone-applet.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c
index c269c7c7d..66ce4592b 100644
--- a/megaphone/src/megaphone-applet.c
+++ b/megaphone/src/megaphone-applet.c
@@ -230,7 +230,7 @@ megaphone_applet_preferences_response_cb (GtkWidget *dialog,
account_id = empathy_account_get_unique_name (account);
contact_id = empathy_contact_get_id (contact);
- str = g_strconcat (account_id, "/", contact_id, NULL);
+ str = g_strconcat (account_id, ":", contact_id, NULL);
panel_applet_gconf_set_string (PANEL_APPLET (applet),
"avatar_token", "",
NULL);
@@ -442,12 +442,16 @@ megaphone_applet_set_contact (MegaphoneApplet *applet,
/* Lookup the new contact */
if (str) {
- strv = g_strsplit (str, "/", 2);
- priv->account = empathy_account_manager_get_account (priv->account_manager,
- strv[0]);
- priv->id = strv[1];
- g_free (strv[0]);
- g_free (strv);
+ strv = g_strsplit (str, ":", 2);
+ if (g_strv_length (strv) == 2) {
+ priv->account = empathy_account_manager_get_account (
+ priv->account_manager, strv[0]);
+ priv->id = strv[1];
+ g_free (strv[0]);
+ g_free (strv);
+ } else {
+ g_strfreev (strv);
+ }
}
if (priv->account) {