From: Christian H. <ch...@us...> - 2003-10-21 18:18:13
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv10103 Modified Files: buddyicon.c Log Message: Conversation windows kept a GaimBuddyIcon set even after the icon was destroyed. Now all conversations containing the icon being destroyed are updated to remove the icon. This fixes bug #826527, which javabsp closed a bit too prematurely ;) However, because GaimConversation references it, this should never actually happen, so I suspect something else is happening, but sanity statements are good anyway. Index: buddyicon.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddyicon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- buddyicon.c 2 Oct 2003 05:26:40 -0000 1.4 +++ buddyicon.c 21 Oct 2003 17:41:57 -0000 1.5 @@ -75,7 +75,10 @@ gaim_buddy_icon_new(GaimAccount *account void gaim_buddy_icon_destroy(GaimBuddyIcon *icon) { + GaimConversation *conv; + GaimAccount *account; GHashTable *icon_cache; + const char *username; g_return_if_fail(icon != NULL); @@ -85,6 +88,14 @@ gaim_buddy_icon_destroy(GaimBuddyIcon *i return; } + + account = gaim_buddy_icon_get_account(icon); + username = gaim_buddy_icon_get_username(icon); + + conv = gaim_find_conversation_with_account(username, account); + + if (conv != NULL && gaim_conversation_get_type(conv) == GAIM_CONV_IM) + gaim_conv_im_set_icon(GAIM_CONV_IM(conv), NULL); icon_cache = g_hash_table_lookup(account_cache, gaim_buddy_icon_get_account(icon)); |