Mercurial > pidgin
changeset 9246:e20af87d8721
[gaim-migrate @ 10045]
Patch from Felipe Contreras that fixes corrupt buddy icon checksums and
adds a menu item called "Update Buddy Icon."
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 09 Jun 2004 05:32:17 +0000 |
parents | 9b138ebf9ca8 |
children | 933c7418fd03 |
files | src/protocols/msn/msn.c src/protocols/msn/slplink.c |
diffstat | 2 files changed, 30 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Wed Jun 09 04:34:25 2004 +0000 +++ b/src/protocols/msn/msn.c Wed Jun 09 05:32:17 2004 +0000 @@ -379,6 +379,20 @@ gaim_xfer_request(xfer); } +static void +update_buddy_icon_cb(GaimBlistNode *node, gpointer ignored) +{ + GaimBuddy *buddy; + GaimConnection *gc; + + g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + + buddy = (GaimBuddy *) node; + gc = gaim_account_get_connection(buddy->account); + + msn_request_buddy_icon(gc, buddy->name); +} + /************************************************************************** * Protocol Plugin ops **************************************************************************/ @@ -517,10 +531,6 @@ m = g_list_append(m, act); } - act = gaim_blist_node_action_new(_("Send File"), - show_send_file_cb, NULL); - - m = g_list_append(m, act); } if (g_ascii_strcasecmp(buddy->name, @@ -529,6 +539,16 @@ act = gaim_blist_node_action_new(_("Initiate Chat"), initiate_chat_cb, NULL); m = g_list_append(m, act); + + act = gaim_blist_node_action_new(_("Send File"), + show_send_file_cb, NULL); + + m = g_list_append(m, act); + + act = gaim_blist_node_action_new(_("Update Buddy Icon"), + update_buddy_icon_cb, NULL); + + m = g_list_append(m, act); } return m;
--- a/src/protocols/msn/slplink.c Wed Jun 09 04:34:25 2004 +0000 +++ b/src/protocols/msn/slplink.c Wed Jun 09 05:32:17 2004 +0000 @@ -240,10 +240,13 @@ { /* The whole message has been sent */ - if ((slpmsg->slpcall != NULL) && - (slpmsg->slpcall->cb != NULL)) + if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030) { - slpmsg->slpcall->cb(slpmsg->slpcall, NULL, 0); + if ((slpmsg->slpcall != NULL) && + (slpmsg->slpcall->cb != NULL)) + { + slpmsg->slpcall->cb(slpmsg->slpcall, NULL, 0); + } } msn_slpmsg_destroy(slpmsg);