diff src/prpl.c @ 4687:283fb289c510

[gaim-migrate @ 4998] This is a new buddy list. Lots of things about it just Don't Work. I probably already know about those things, and you'd just be wasting my time in submitting a bug report about it. I decided that instead of getting it to all work perfectly before committing, that I'd get it in cvs, and slowly fix it with regular commits. That way, it's easier to keep track of things, and other developers can help. Plus, I'm getting pissed off at the buddy list and want it to die. It's kinda boring, and doing nothing but the buddy list for such a long time has just gotten me very bitter. After 0.60 is released later this week, Gaim will resume being fun. This week is going to be very stressful, though, I'm sure. Things you ought to know about this buddy list: - It crashes - It leaks - There's no way to edit the buddy list, or access offline buddies - Most of the menus and buttons and whatnot just plain ol' don't work. - Status icons are only implemented for AIM. That's mostly just because I'm lazy. As such, you may want to be wary of updating this. If you do decide to update this, you may want to learn "cvs update -D yesterday" as well :) All the art there is just placeholder art. You probably won't really have as many problems as it sounds like you will from reading this. This message is extra-negative to stress that I don't want to be bothered with complaints about something not working about it :). I'll repeat: If something doesn't work, I probably already know about it. If you want to actually help with something, I'd be delighted to have it. IM me. -s. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Mar 2003 05:30:31 +0000
parents 42d53c416bb9
children c4ebe1a8484b
line wrap: on
line diff
--- a/src/prpl.c	Mon Mar 10 04:51:10 2003 +0000
+++ b/src/prpl.c	Mon Mar 10 05:30:31 2003 +0000
@@ -20,6 +20,7 @@
  */
 
 #include "gaim.h"
+#include "gtkutils.h"
 #include "prpl.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -590,6 +591,24 @@
 	/* Update the buddy icon for this user. */
 	conv = gaim_find_conversation(who);
 
+	/* XXX Buddy Icon should probalby be part of struct buddy instead of this weird global
+	 * linked list stuff. */
+
+	if (gaim_find_buddy(gc->account, who)) { 
+		/* This is one of our buddies, so we'll cache this icon for our buddy list */
+		
+		/* Because only OSCAR does buddy icons right now, I don't feel so bad doing nothing to
+		   save what protocol this is from. */
+		char *filename = g_build_filename(gaim_user_dir(), "icons", normalize(who), NULL);
+		FILE *file = NULL;
+
+		file = fopen(filename, "wb");
+		if (!file)
+			return;
+		fwrite(data, 1, len, file);
+		fclose(file);
+	}
+	
 	if (conv != NULL && gaim_conversation_get_gc(conv) == gc)
 		gaim_gtkconv_update_buddy_icon(conv);
 }
@@ -652,7 +671,7 @@
 {
 	char buf[BUF_LONG];
 	struct got_add *ga = g_new0(struct got_add, 1);
-	struct buddy *b = find_buddy(gc->account, who);
+	struct buddy *b = gaim_find_buddy(gc->account, who);
 
 	ga->gc = gc;
 	ga->who = g_strdup(who);