Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 9801:7aa5a20519ee
[gaim-migrate @ 10669]
On Fri, 2004-08-20 at 23:57, Tim Ringenbach wrote:
> > relative buddy icon paths instead of absolute ones from nosnilmot. this
> > should save some headaches migrating a ~/.gaim around
> I think you broke something here. On start up I notice all buddy icons
> are fetched again, and they only show up in my buddy list, never my
> conversation window.
I did break something. I think the logic of "if the old file doesn't
exist, then delete the new one instead" when removing old icons isn't
exactly what I meant to do.
You were also correct to point out that prpls might use them directly -
oscar does.
Patch attached to fix both cases.
Regards,
Stu.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 21 Aug 2004 15:05:45 +0000 |
parents | 62eb9fe24692 |
children | 41b97d72e647 |
comparison
equal
deleted
inserted
replaced
9800:cc68a8c6e741 | 9801:7aa5a20519ee |
---|---|
2761 bi->availmsg = NULL; | 2761 bi->availmsg = NULL; |
2762 | 2762 |
2763 /* Server stored icon stuff */ | 2763 /* Server stored icon stuff */ |
2764 if (info->iconcsumlen) { | 2764 if (info->iconcsumlen) { |
2765 const char *filename = NULL, *saved_b16 = NULL; | 2765 const char *filename = NULL, *saved_b16 = NULL; |
2766 char *b16 = NULL; | 2766 char *b16 = NULL, *filepath = NULL; |
2767 GaimBuddy *b = NULL; | 2767 GaimBuddy *b = NULL; |
2768 | 2768 |
2769 b16 = gaim_base16_encode(info->iconcsum, info->iconcsumlen); | 2769 b16 = gaim_base16_encode(info->iconcsum, info->iconcsumlen); |
2770 b = gaim_find_buddy(gc->account, info->sn); | 2770 b = gaim_find_buddy(gc->account, info->sn); |
2771 /* | 2771 /* |
2775 filename = gaim_blist_node_get_string((GaimBlistNode*)b, "buddy_icon"); | 2775 filename = gaim_blist_node_get_string((GaimBlistNode*)b, "buddy_icon"); |
2776 if (filename != NULL) { | 2776 if (filename != NULL) { |
2777 if (g_file_test(filename, G_FILE_TEST_EXISTS)) | 2777 if (g_file_test(filename, G_FILE_TEST_EXISTS)) |
2778 saved_b16 = gaim_blist_node_get_string((GaimBlistNode*)b, | 2778 saved_b16 = gaim_blist_node_get_string((GaimBlistNode*)b, |
2779 "icon_checksum"); | 2779 "icon_checksum"); |
2780 else { | |
2781 filepath = g_build_filename(gaim_buddy_icons_get_cache_dir(), | |
2782 filename, NULL); | |
2783 if (g_file_test(filepath, G_FILE_TEST_EXISTS)) | |
2784 saved_b16 = gaim_blist_node_get_string((GaimBlistNode*)b, | |
2785 "icon_checksum"); | |
2786 g_free(filepath); | |
2787 } | |
2780 } else | 2788 } else |
2781 saved_b16 = NULL; | 2789 saved_b16 = NULL; |
2782 | 2790 |
2783 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { | 2791 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { |
2784 GSList *cur = od->requesticon; | 2792 GSList *cur = od->requesticon; |