Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 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 | 9862a82206ba |
children | 563a42d98e3a |
comparison
equal
deleted
inserted
replaced
16904:b799918b6cdc | 16905:aa87ecd650d2 |
---|---|
4879 presence = purple_buddy_get_presence(buddy); | 4879 presence = purple_buddy_get_presence(buddy); |
4880 | 4880 |
4881 status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy, | 4881 status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy, |
4882 PIDGIN_STATUS_ICON_SMALL); | 4882 PIDGIN_STATUS_ICON_SMALL); |
4883 | 4883 |
4884 avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE); | 4884 /* Speed it up if we don't want buddy icons. */ |
4885 if(biglist) | |
4886 avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE); | |
4887 else | |
4888 avatar = NULL; | |
4889 | |
4885 if (!avatar) { | 4890 if (!avatar) { |
4886 g_object_ref(G_OBJECT(gtkblist->empty_avatar)); | 4891 g_object_ref(G_OBJECT(gtkblist->empty_avatar)); |
4887 avatar = gtkblist->empty_avatar; | 4892 avatar = gtkblist->empty_avatar; |
4888 } else if ((!PURPLE_BUDDY_IS_ONLINE(buddy) || purple_presence_is_idle(presence))) { | 4893 } else if ((!PURPLE_BUDDY_IS_ONLINE(buddy) || purple_presence_is_idle(presence))) { |
4889 do_alphashift(avatar, avatar, 77); | 4894 do_alphashift(avatar, avatar, 77); |
5057 GtkTreeIter iter; | 5062 GtkTreeIter iter; |
5058 GdkPixbuf *status; | 5063 GdkPixbuf *status; |
5059 GdkPixbuf *avatar; | 5064 GdkPixbuf *avatar; |
5060 GdkPixbuf *emblem; | 5065 GdkPixbuf *emblem; |
5061 char *mark; | 5066 char *mark; |
5067 gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); | |
5062 | 5068 |
5063 if(!insert_node(list, node, &iter)) | 5069 if(!insert_node(list, node, &iter)) |
5064 return; | 5070 return; |
5065 | 5071 |
5066 status = pidgin_blist_get_status_icon(node, | 5072 status = pidgin_blist_get_status_icon(node, |
5067 PIDGIN_STATUS_ICON_SMALL); | 5073 PIDGIN_STATUS_ICON_SMALL); |
5068 emblem = pidgin_blist_get_emblem(node); | 5074 emblem = pidgin_blist_get_emblem(node); |
5069 avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE); | 5075 |
5076 /* Speed it up if we don't want buddy icons. */ | |
5077 if(showicons) | |
5078 avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE); | |
5079 else | |
5080 avatar = NULL; | |
5070 | 5081 |
5071 mark = g_markup_escape_text(purple_chat_get_name(chat), -1); | 5082 mark = g_markup_escape_text(purple_chat_get_name(chat), -1); |
5072 | 5083 |
5073 gtk_tree_store_set(gtkblist->treemodel, &iter, | 5084 gtk_tree_store_set(gtkblist->treemodel, &iter, |
5074 STATUS_ICON_COLUMN, status, | 5085 STATUS_ICON_COLUMN, status, |