comparison libpurple/buddyicon.c @ 32578:978dd52814c7

propagate from branch 'im.pidgin.pidgin' (head b64b40b3762950d0b8b4bff4f4bb8bddeefc24ac) to branch 'im.pidgin.cpw.qulogic.gtk3' (head 907442ea1932404e6753dbf649de9a5ea2406766)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 09 May 2009 20:10:22 +0000
parents 1a1c12c122c9
children 01f1929d0936
comparison
equal deleted inserted replaced
32577:a70f05468fb4 32578:978dd52814c7
751 purple_account_set_string(account, "buddy_icon", NULL); 751 purple_account_set_string(account, "buddy_icon", NULL);
752 purple_account_set_int(account, "buddy_icon_timestamp", 0); 752 purple_account_set_int(account, "buddy_icon_timestamp", 0);
753 } 753 }
754 unref_filename(old_icon); 754 unref_filename(old_icon);
755 755
756 old_img = g_hash_table_lookup(pointer_icon_cache, account);
757
756 if (img) 758 if (img)
757 g_hash_table_insert(pointer_icon_cache, account, img); 759 g_hash_table_insert(pointer_icon_cache, account, img);
758 else 760 else
759 g_hash_table_remove(pointer_icon_cache, account); 761 g_hash_table_remove(pointer_icon_cache, account);
760 762
768 770
769 if (prpl_info && prpl_info->set_buddy_icon) 771 if (prpl_info && prpl_info->set_buddy_icon)
770 prpl_info->set_buddy_icon(gc, img); 772 prpl_info->set_buddy_icon(gc, img);
771 } 773 }
772 774
773 if ((old_img = g_hash_table_lookup(pointer_icon_cache, account))) 775 if (old_img)
774 purple_imgstore_unref(old_img); 776 purple_imgstore_unref(old_img);
775 else if (old_icon) 777 else if (old_icon)
776 { 778 {
777 /* The old icon may not have been loaded into memory. In that 779 /* The old icon may not have been loaded into memory. In that
778 * case, we'll need to uncache the filename. The filenames 780 * case, we'll need to uncache the filename. The filenames