# HG changeset patch # User Mark Doliner # Date 1229367755 0 # Node ID 694591875bc936de837c3f0a0d840c5cf6ec7223 # Parent a5f2536b911b6e8af31b883b5cd3510bee5fc475 Use the friendly/vanity url when it's available in myspace "View web profile" links diff -r a5f2536b911b -r 694591875bc9 libpurple/protocols/myspace/user.c --- 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("%s", - user->id, _("View web profile")); + if (user->buddy != NULL) + profile = g_strdup_printf("%s", + purple_buddy_get_name(user->buddy), _("View web profile")); + else + profile = g_strdup_printf("%s", + user->id, _("View web profile")); purple_notify_user_info_add_pair(user_info, NULL, profile); g_free(profile); } diff -r a5f2536b911b -r 694591875bc9 libpurple/protocols/myspace/user.h --- a/libpurple/protocols/myspace/user.h Mon Dec 15 09:48:20 2008 +0000 +++ b/libpurple/protocols/myspace/user.h Mon Dec 15 19:02:35 2008 +0000 @@ -25,6 +25,7 @@ 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 @@ 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;