diff src/protocols/msn/msn.c @ 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 a9151be6fe1a
children 7a8aa87164ae
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;