pidgin: 932c83e8: Use the friendly/vanity url when it's av..
markdoliner at pidgin.im
markdoliner at pidgin.im
Mon Dec 15 14:05:49 EST 2008
-----------------------------------------------------------------
Revision: 932c83e821824239896f933e32349175efb85741
Ancestor: f1babbc29f374bf3eea7b13c40a242099f1bab29
Author: markdoliner at pidgin.im
Date: 2008-12-15T19:02:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/932c83e821824239896f933e32349175efb85741
Modified files:
libpurple/protocols/myspace/user.c
libpurple/protocols/myspace/user.h
ChangeLog:
Use the friendly/vanity url when it's available in myspace
"View web profile" links
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/user.c 40005b3121e9d4145488978c1c53c297f38c4574
+++ libpurple/protocols/myspace/user.c caca336ec7b6020932ab271dd986313a423ffb18
@@ -174,8 +174,12 @@ msim_append_user_info(MsimSession *sessi
/* 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);
}
============================================================
--- libpurple/protocols/myspace/user.h 7e2ccaebb860d58b5b7345b65f33998dc6f1c04b
+++ libpurple/protocols/myspace/user.h c88a559f7db6d3058dce7e9670a3a2fab8fee45c
@@ -25,6 +25,7 @@ typedef struct _MsimUser
typedef struct _MsimUser
{
PurpleBuddy *buddy;
+ /* Note: id is also &buddy->node (set_blist_node_int), when buddy is non-NULL */
int id;
guint client_cv;
gchar *client_info;
@@ -34,7 +35,6 @@ typedef struct _MsimUser
guint total_friends;
gchar *headline;
gchar *display_name;
- /* Note: uid is in &buddy->node (set_blist_node_int), since it never changes */
gchar *username;
gchar *band_name, *song_name;
gchar *image_url;
More information about the Commits
mailing list