From: Sjoerd Simons Date: Mon, 14 Sep 2009 22:27:21 +0000 (+0100) Subject: Use : instead of / to seperate account and contact id X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=0b235f9223d30ea4a62c692cac65fa509f824635 Use : instead of / to seperate account and contact id --- diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c index c269c7c7..66ce4592 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) {