soc.2010.icq-tlc: 0e263caa: "View Web Profile" link now leads to the...

ivan.komarov at soc.pidgin.im ivan.komarov at soc.pidgin.im
Sat May 1 14:35:41 EDT 2010


-----------------------------------------------------------------
Revision: 0e263caa5d687101e436029f2f8d09053ae06e23
Ancestor: c9659a3fecdd575434640e531c3eb61f90de6976
Author: ivan.komarov at soc.pidgin.im
Date: 2010-05-01T18:32:43
Branch: im.pidgin.soc.2010.icq-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/0e263caa5d687101e436029f2f8d09053ae06e23

Modified files:
        libpurple/protocols/oscar/oscar.c

ChangeLog: 

"View Web Profile" link now leads to the correct link for ICQ accounts (#9890).

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	23ee7e0f130aab4bc97ce397ac8c3f727badd1c6
+++ libpurple/protocols/oscar/oscar.c	ec79d8d9fcba376be091b363977e8f23c748eff2
@@ -3534,7 +3534,7 @@ static int purple_parse_userinfo(OscarDa
 	PurpleConnection *gc = od->gc;
 	PurpleAccount *account = purple_connection_get_account(gc);
 	PurpleNotifyUserInfo *user_info;
-	gchar *tmp = NULL, *info_utf8 = NULL;
+	gchar *tmp = NULL, *info_utf8 = NULL, *base_profile_url = NULL;
 	va_list ap;
 	aim_userinfo_t *userinfo;
 
@@ -3587,8 +3587,9 @@ static int purple_parse_userinfo(OscarDa
 	}
 
 	purple_notify_user_info_add_section_break(user_info);
-	tmp = g_strdup_printf("<a href=\"http://profiles.aim.com/%s\">%s</a>",
-			purple_normalize(account, userinfo->bn), _("View web profile"));
+	base_profile_url = oscar_util_valid_name_icq(userinfo->bn) ? "http://www.icq.com/people" : "http://profiles.aim.com";
+	tmp = g_strdup_printf("<a href=\"%s/%s\">%s</a>",
+			base_profile_url, purple_normalize(account, userinfo->bn), _("View web profile"));
 	purple_notify_user_info_add_pair(user_info, NULL, tmp);
 	g_free(tmp);
 


More information about the Commits mailing list