Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/buddy.c @ 16386:e0c9a46b459f
Move the prpl icon checksum code into the core, so we can delete the
checksum if the cache file disappears.
See ticket #223
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 25 Apr 2007 00:56:13 +0000 |
parents | 391a79778f89 |
children | 4fc51a87ce42 |
comparison
equal
deleted
inserted
replaced
16385:a0df0eb75e1b | 16386:e0c9a46b459f |
---|---|
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 |
968 purple_buddy_icons_set_for_user(js->gc->account, bare_jid, | |
969 data, size); | |
970 | |
971 purple_cipher_digest_region("sha1", (guchar *)data, size, | 968 purple_cipher_digest_region("sha1", (guchar *)data, size, |
972 sizeof(hashval), hashval, NULL); | 969 sizeof(hashval), hashval, NULL); |
973 p = hash; | 970 p = hash; |
974 for(i=0; i<20; i++, p+=2) | 971 for(i=0; i<20; i++, p+=2) |
975 snprintf(p, 3, "%02x", hashval[i]); | 972 snprintf(p, 3, "%02x", hashval[i]); |
976 purple_blist_node_set_string((PurpleBlistNode*)b, "avatar_hash", hash); | 973 |
974 purple_buddy_icons_set_for_user(js->gc->account, bare_jid, | |
975 data, size, hash); | |
977 | 976 |
978 g_free(data); | 977 g_free(data); |
979 g_free(bintext); | 978 g_free(bintext); |
980 } | 979 } |
981 } | 980 } |