comparison libpurple/protocols/jabber/buddy.c @ 16375:391a79778f89

Rework the buddy icon subsystem to use the imgstore subsystem, and modify the imgstore subsystem to not require IDs for everything.
author Richard Laager <rlaager@wiktel.com>
date Tue, 24 Apr 2007 03:57:07 +0000
parents 32c366eeeb99
children e0c9a46b459f
comparison
equal deleted inserted replaced
16374:2a19bbc743ed 16375:391a79778f89
712 712
713 purple_notify_userinfo(jbi->js->gc, jbi->jid, user_info, NULL, NULL); 713 purple_notify_userinfo(jbi->js->gc, jbi->jid, user_info, NULL, NULL);
714 purple_notify_user_info_destroy(user_info); 714 purple_notify_user_info_destroy(user_info);
715 715
716 while(jbi->vcard_imgids) { 716 while(jbi->vcard_imgids) {
717 purple_imgstore_unref(GPOINTER_TO_INT(jbi->vcard_imgids->data)); 717 purple_imgstore_unref_by_id(GPOINTER_TO_INT(jbi->vcard_imgids->data));
718 jbi->vcard_imgids = g_slist_delete_link(jbi->vcard_imgids, jbi->vcard_imgids); 718 jbi->vcard_imgids = g_slist_delete_link(jbi->vcard_imgids, jbi->vcard_imgids);
719 } 719 }
720 720
721 jbi->js->pending_buddy_info_requests = g_slist_remove(jbi->js->pending_buddy_info_requests, jbi); 721 jbi->js->pending_buddy_info_requests = g_slist_remove(jbi->js->pending_buddy_info_requests, jbi);
722 722
957 char *p, hash[41]; 957 char *p, hash[41];
958 gboolean photo = (strcmp(child->name, "PHOTO") == 0); 958 gboolean photo = (strcmp(child->name, "PHOTO") == 0);
959 959
960 data = purple_base64_decode(bintext, &size); 960 data = purple_base64_decode(bintext, &size);
961 961
962 jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add(data, size, "logo.png"))); 962 jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(data, size, "logo.png")));
963 g_string_append_printf(info_text, 963 g_string_append_printf(info_text,
964 "<b>%s:</b> <img id='%d'><br/>", 964 "<b>%s:</b> <img id='%d'><br/>",
965 photo ? _("Photo") : _("Logo"), 965 photo ? _("Photo") : _("Logo"),
966 GPOINTER_TO_INT(jbi->vcard_imgids->data)); 966 GPOINTER_TO_INT(jbi->vcard_imgids->data));
967 967