changeset 10072:cf3454eadc22

[gaim-migrate @ 11051] shx's see your own msn buddy icon patch here as well committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 02 Oct 2004 11:38:42 +0000
parents af06746954de
children 06fa76a16ac0
files src/protocols/msn/slp.c
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/slp.c	Fri Oct 01 22:08:39 2004 +0000
+++ b/src/protocols/msn/slp.c	Sat Oct 02 11:38:42 2004 +0000
@@ -921,6 +921,37 @@
 	}
 	else
 	{
+		MsnObject *my_obj = NULL;
+		const char *filename = NULL;
+		gchar *data = NULL;
+		gsize len = 0;
+		const char *my_info = NULL;
+		GSList *sl;
+
+		gaim_debug_info("msn", "Requesting our own user display\n");
+
+		my_obj = msn_user_get_object(session->user);
+
+		if (my_obj != NULL)
+		{
+			filename = msn_object_get_real_location(my_obj);
+			my_info = msn_object_get_sha1c(my_obj);
+		}
+
+		if (filename != NULL)
+			g_file_get_contents(filename, &data, &len, NULL);
+
+		/* TODO: I think we need better buddy icon core functions. */
+		gaim_buddy_icons_set_for_user(account, user->passport, (void *)data, len);
+		
+		sl = gaim_find_buddies(account, user->passport);
+
+		for (; sl != NULL; sl = sl->next)
+		{
+			GaimBuddy *buddy = (GaimBuddy *)sl->data;
+			gaim_blist_node_set_string((GaimBlistNode*)buddy, "icon_checksum", info);
+		}
+
 		session->userlist->buddy_icon_window++;
 		msn_release_buddy_icon_request(session->userlist);
 	}