comparison 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
comparison
equal deleted inserted replaced
4686:a1de8a9c99ba 4687:283fb289c510
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * 19 *
20 */ 20 */
21 21
22 #include "gaim.h" 22 #include "gaim.h"
23 #include "gtkutils.h"
23 #include "prpl.h" 24 #include "prpl.h"
24 #include <sys/types.h> 25 #include <sys/types.h>
25 #include <sys/stat.h> 26 #include <sys/stat.h>
26 #include <unistd.h> 27 #include <unistd.h>
27 #include <string.h> 28 #include <string.h>
588 id->len = len; 589 id->len = len;
589 590
590 /* Update the buddy icon for this user. */ 591 /* Update the buddy icon for this user. */
591 conv = gaim_find_conversation(who); 592 conv = gaim_find_conversation(who);
592 593
594 /* XXX Buddy Icon should probalby be part of struct buddy instead of this weird global
595 * linked list stuff. */
596
597 if (gaim_find_buddy(gc->account, who)) {
598 /* This is one of our buddies, so we'll cache this icon for our buddy list */
599
600 /* Because only OSCAR does buddy icons right now, I don't feel so bad doing nothing to
601 save what protocol this is from. */
602 char *filename = g_build_filename(gaim_user_dir(), "icons", normalize(who), NULL);
603 FILE *file = NULL;
604
605 file = fopen(filename, "wb");
606 if (!file)
607 return;
608 fwrite(data, 1, len, file);
609 fclose(file);
610 }
611
593 if (conv != NULL && gaim_conversation_get_gc(conv) == gc) 612 if (conv != NULL && gaim_conversation_get_gc(conv) == gc)
594 gaim_gtkconv_update_buddy_icon(conv); 613 gaim_gtkconv_update_buddy_icon(conv);
595 } 614 }
596 615
597 void remove_icon_data(struct gaim_connection *gc) 616 void remove_icon_data(struct gaim_connection *gc)
650 void show_got_added(struct gaim_connection *gc, const char *id, 669 void show_got_added(struct gaim_connection *gc, const char *id,
651 const char *who, const char *alias, const char *msg) 670 const char *who, const char *alias, const char *msg)
652 { 671 {
653 char buf[BUF_LONG]; 672 char buf[BUF_LONG];
654 struct got_add *ga = g_new0(struct got_add, 1); 673 struct got_add *ga = g_new0(struct got_add, 1);
655 struct buddy *b = find_buddy(gc->account, who); 674 struct buddy *b = gaim_find_buddy(gc->account, who);
656 675
657 ga->gc = gc; 676 ga->gc = gc;
658 ga->who = g_strdup(who); 677 ga->who = g_strdup(who);
659 ga->alias = alias ? g_strdup(alias) : NULL; 678 ga->alias = alias ? g_strdup(alias) : NULL;
660 679