Mercurial > pidgin
changeset 17972:8f49acac9d1c
Store 3rd-party client name/version and official client build version (cv) separately.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Tue, 31 Jul 2007 02:56:58 +0000 |
parents | 13a4f57f53a9 |
children | acff371d7908 |
files | libpurple/protocols/myspace/myspace.c |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c Fri Jul 27 03:47:12 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Tue Jul 31 02:56:58 2007 +0000 @@ -572,6 +572,7 @@ purple_connection_update_progress(session->gc, _("Logging in"), 2, 4); + response_len = 0; response = msim_compute_login_response(nc, account->username, account->password, &response_len); g_free(nc); @@ -1341,8 +1342,6 @@ gchar *username, *cv; gboolean ret; PurpleBuddy *buddy; - gchar *client_info; - username = msim_msg_get_string(msg, "_username"); cv = msim_msg_get_string(msg, "cv"); @@ -1354,10 +1353,7 @@ if (buddy) { - client_info = g_strdup_printf("MySpaceIM build %s", cv); - - purple_blist_node_set_string(&buddy->node, "client", client_info); - /* Do not free client_info - blist owns */ + purple_blist_node_set_int(&buddy->node, "client_cv", atol(cv)); ret = TRUE; } else { ret = FALSE; @@ -1604,6 +1600,7 @@ g_return_val_if_fail(buddy != NULL, FALSE); + purple_blist_node_remove_setting(&buddy->node, "client"); purple_blist_node_set_string(&buddy->node, "client", client_info); @@ -1767,10 +1764,16 @@ if (buddy) { + gint cv; + str = purple_blist_node_get_string(&buddy->node, "client"); + cv = purple_blist_node_get_int(&buddy->node, "client_cv"); + if (str) + { purple_notify_user_info_add_pair(user_info, _("Client Version"), - g_strdup(str)); + g_strdup_printf("%s (build %d)", str, cv)); + } } purple_notify_userinfo(session->gc, user, user_info, NULL, NULL);