Index: gtkconv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v retrieving revision 1.325 diff -u -u -r1.325 gtkconv.c --- gtkconv.c 24 Feb 2004 04:29:44 -0000 1.325 +++ gtkconv.c 29 Feb 2004 23:11:33 -0000 @@ -4999,9 +4999,24 @@ if((buddy = gaim_find_buddy(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv))) != NULL) { - const char *file; - if((file = gaim_blist_node_get_string((GaimBlistNode*)buddy, "buddy_icon"))) - gtkconv->u.im->anim = gdk_pixbuf_animation_new_from_file(file, &err); + const char *iconfile; + if((iconfile = gaim_blist_node_get_string((GaimBlistNode*)buddy, "buddy_icon"))) { + GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); + struct stat st; + if ((icon == NULL) && (!stat(iconfile, &st))) { + FILE *file = fopen(iconfile, "rb"); + if (file) { + char *data = g_malloc(st.st_size); + fread(data, 1, st.st_size, file); + fclose(file); + gaim_buddy_icons_set_for_user(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv), data, st.st_size); + g_free(data); + } + return; + } + else + gtkconv->u.im->anim = gdk_pixbuf_animation_new_from_file(iconfile, &err); + } } else {