diff src/gtkconv.c @ 6846:8ab95f4c9800

[gaim-migrate @ 7391] Added new buddy icon caching code. Each GaimBuddy has its own icon, and the complete list of all icons is now stored in a set of hashtables for quick retrieval. Buddy icons now live much happier in the core, with the magma and tooth fairies (that's where they really live). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 15 Sep 2003 07:35:49 +0000
parents 8eebba08b44b
children 1b5b0cea6915
line wrap: on
line diff
--- a/src/gtkconv.c	Mon Sep 15 02:23:58 2003 +0000
+++ b/src/gtkconv.c	Mon Sep 15 07:35:49 2003 +0000
@@ -5019,11 +5019,15 @@
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs"))
 			update_tab_icon(conv);
 	}
-	else if(type == GAIM_CONV_UPDATE_ADD ||
-			type == GAIM_CONV_UPDATE_REMOVE) {
+	else if (type == GAIM_CONV_UPDATE_ADD ||
+			 type == GAIM_CONV_UPDATE_REMOVE) {
 
 		update_convo_add_button(conv);
 	}
+	else if (type == GAIM_CONV_UPDATE_ICON)
+	{
+		gaim_gtkconv_update_buddy_icon(conv);
+	}
 }
 
 static GaimConversationUiOps conversation_ui_ops =
@@ -5226,8 +5230,9 @@
 
 	GaimBuddy *buddy;
 
-	void *data;
-	int len, delay;
+	const void *data;
+	size_t len;
+	int delay;
 
 	GdkPixbuf *buf;
 
@@ -5265,10 +5270,12 @@
 			gtkconv->u.im->anim = gdk_pixbuf_animation_new_from_file(file, &err);
 			g_free(file);
 		}
-	} else {
-		data = get_icon_data(gaim_conversation_get_gc(conv),
-				normalize(gaim_conversation_get_name(conv)),
-				&len);
+	}
+	else
+	{
+		GaimBuddyIcon *icon = gaim_im_get_icon(GAIM_IM(conv));
+
+		data = gaim_buddy_icon_get_data(icon, &len);
 
 		if (!data)
 			return;