# HG changeset patch # User Stu Tomlinson # Date 1133634937 0 # Node ID 1504d878be542a55f11f0e591f4eb86648cbdddc # Parent ae190d00b06d73cc018b0d6778d6cd1ec13ab69c [gaim-migrate @ 14609] Patch 1370694 from Sadrul to fix more buddy count problems: "If you have the same buddy in more than one group for an account, and that account goes offline, then the buddy-count shows wrong." committer: Tailor Script diff -r ae190d00b06d -r 1504d878be54 src/blist.c --- a/src/blist.c Sat Dec 03 18:07:39 2005 +0000 +++ b/src/blist.c Sat Dec 03 18:35:37 2005 +0000 @@ -2235,6 +2235,7 @@ GaimChat *chat; GaimContact *contact; GaimGroup *group; + GList *list = NULL, *iter = NULL; g_return_if_fail(gaimbuddylist != NULL); @@ -2273,7 +2274,8 @@ if (contact->currentsize == 0) group->currentsize--; - gaim_presence_set_status_active(presence, "offline", TRUE); + if (!g_list_find(list, presence)) + list = g_list_prepend(list, presence); if (ops && ops->remove) ops->remove(gaimbuddylist, bnode); @@ -2297,6 +2299,12 @@ } } } + + for (iter = list; iter; iter = iter->next) + { + gaim_presence_set_status_active(iter->data, "offline", TRUE); + } + g_list_free(list); } gboolean gaim_group_on_account(GaimGroup *g, GaimAccount *account)