Mercurial > pidgin.yaz
diff libpurple/protocols/myspace/user.c @ 24726:694591875bc9
Use the friendly/vanity url when it's available in myspace
"View web profile" links
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 15 Dec 2008 19:02:35 +0000 |
parents | 128a77f3b3c4 |
children | 295464ae2d2a f8dbd57cf635 |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/user.c Mon Dec 15 09:48:20 2008 +0000 +++ b/libpurple/protocols/myspace/user.c Mon Dec 15 19:02:35 2008 +0000 @@ -174,8 +174,12 @@ /* TODO: link to username, if available */ char *profile; purple_notify_user_info_add_section_break(user_info); - profile = g_strdup_printf("<a href=\"http://myspace.com/%d\">%s</a>", - user->id, _("View web profile")); + if (user->buddy != NULL) + profile = g_strdup_printf("<a href=\"http://myspace.com/%s\">%s</a>", + purple_buddy_get_name(user->buddy), _("View web profile")); + else + profile = g_strdup_printf("<a href=\"http://myspace.com/%d\">%s</a>", + user->id, _("View web profile")); purple_notify_user_info_add_pair(user_info, NULL, profile); g_free(profile); }