Mercurial > pidgin
comparison libpurple/buddyicon.c @ 16378:bae921154351
If we're not caching icons, then don't save the filename.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 24 Apr 2007 13:27:42 +0000 |
parents | 44489a2123e7 |
children | 72dc611f3257 |
comparison
equal
deleted
inserted
replaced
16377:44489a2123e7 | 16378:bae921154351 |
---|---|
377 purple_buddy_set_icon(buddy, icon_to_set); | 377 purple_buddy_set_icon(buddy, icon_to_set); |
378 | 378 |
379 | 379 |
380 old_icon = g_strdup(purple_blist_node_get_string((PurpleBlistNode *)buddy, | 380 old_icon = g_strdup(purple_blist_node_get_string((PurpleBlistNode *)buddy, |
381 "buddy_icon")); | 381 "buddy_icon")); |
382 if (icon->img) | 382 if (icon->img && purple_buddy_icons_is_caching()) |
383 { | 383 { |
384 const char *filename = purple_imgstore_get_filename(icon->img); | 384 const char *filename = purple_imgstore_get_filename(icon->img); |
385 purple_blist_node_set_string((PurpleBlistNode *)buddy, | 385 purple_blist_node_set_string((PurpleBlistNode *)buddy, |
386 "buddy_icon", | 386 "buddy_icon", |
387 filename); | 387 filename); |
635 if (icon_data != NULL && icon_len > 0) | 635 if (icon_data != NULL && icon_len > 0) |
636 img = purple_buddy_icon_data_new(icon_data, icon_len, NULL); | 636 img = purple_buddy_icon_data_new(icon_data, icon_len, NULL); |
637 | 637 |
638 old_icon = g_strdup(purple_blist_node_get_string((PurpleBlistNode *)contact, | 638 old_icon = g_strdup(purple_blist_node_get_string((PurpleBlistNode *)contact, |
639 "custom_buddy_icon")); | 639 "custom_buddy_icon")); |
640 if (img) | 640 if (img && purple_buddy_icons_is_caching()) |
641 { | 641 { |
642 const char *filename = purple_imgstore_get_filename(img); | 642 const char *filename = purple_imgstore_get_filename(img); |
643 purple_blist_node_set_string((PurpleBlistNode *)contact, | 643 purple_blist_node_set_string((PurpleBlistNode *)contact, |
644 "custom_buddy_icon", | 644 "custom_buddy_icon", |
645 filename); | 645 filename); |