[empathy] Use : instead of / to seperate account and contact id



commit 0b235f9223d30ea4a62c692cac65fa509f824635
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Mon Sep 14 23:27:21 2009 +0100

    Use : instead of / to seperate account and contact id

 megaphone/src/megaphone-applet.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c
index c269c7c..66ce459 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) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]