changeset 16905:aa87ecd650d2

Speed up blist manipulations, by Scott Wolchok (EvilSporkMan)
author Ethan Blanton <elb@pidgin.im>
date Sat, 05 May 2007 01:58:20 +0000
parents b799918b6cdc
children 64b7d4ebd2b2 bcba07153da5
files ChangeLog pidgin/gtkblist.c
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 04 23:24:04 2007 +0000
+++ b/ChangeLog	Sat May 05 01:58:20 2007 +0000
@@ -1,5 +1,9 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.0.1 (??/??/????):
+	* Buddy list update speedups when buddy icons are not being
+	  displayed.  (Scott Wolchok)
+
 version 2.0.0 (5/3/2007):
 	* The project has new names - libpurple for the core, Pidgin for the
 	  GTK+ UI and Finch for the ncurses based console UI (AOL LLC)
--- a/pidgin/gtkblist.c	Fri May 04 23:24:04 2007 +0000
+++ b/pidgin/gtkblist.c	Sat May 05 01:58:20 2007 +0000
@@ -4881,7 +4881,12 @@
 	status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy,
 						PIDGIN_STATUS_ICON_SMALL);
 
-	avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE);
+	/* Speed it up if we don't want buddy icons. */
+	if(biglist)
+		avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE);
+	else
+		avatar = NULL;
+
 	if (!avatar) {
 		g_object_ref(G_OBJECT(gtkblist->empty_avatar));
 		avatar = gtkblist->empty_avatar;
@@ -5059,6 +5064,7 @@
 		GdkPixbuf *avatar;
 		GdkPixbuf *emblem;
 		char *mark;
+		gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
 
 		if(!insert_node(list, node, &iter))
 			return;
@@ -5066,7 +5072,12 @@
 		status = pidgin_blist_get_status_icon(node,
 				 PIDGIN_STATUS_ICON_SMALL);
 		emblem = pidgin_blist_get_emblem(node);
-		avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE);
+
+		/* Speed it up if we don't want buddy icons. */
+		if(showicons)
+			avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE);
+		else
+			avatar = NULL;
 
 		mark = g_markup_escape_text(purple_chat_get_name(chat), -1);