Mercurial > pidgin.yaz
changeset 6901:5ace3b44cf61
[gaim-migrate @ 7448]
fix the incorrect group online counts
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 21 Sep 2003 16:14:50 +0000 |
parents | 62cafee71373 |
children | e30bedfb99db |
files | src/blist.c |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.c Sun Sep 21 01:40:16 2003 +0000 +++ b/src/blist.c Sun Sep 21 16:14:50 2003 +0000 @@ -258,12 +258,16 @@ gboolean do_timer = FALSE; if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { + int old_present = buddy->present; buddy->present = GAIM_BUDDY_SIGNING_ON; gaim_signal_emit(gaim_blist_get_handle(), "buddy-signed-on", buddy); do_timer = TRUE; - ((GaimContact*)((GaimBlistNode*)buddy)->parent)->online++; - if(((GaimContact*)((GaimBlistNode*)buddy)->parent)->online == 1) - ((GaimGroup *)((GaimBlistNode *)buddy)->parent->parent)->online++; + + if(old_present != GAIM_BUDDY_SIGNING_OFF) { + ((GaimContact*)((GaimBlistNode*)buddy)->parent)->online++; + if(((GaimContact*)((GaimBlistNode*)buddy)->parent)->online == 1) + ((GaimGroup *)((GaimBlistNode *)buddy)->parent->parent)->online++; + } } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) { buddy->present = GAIM_BUDDY_SIGNING_OFF; gaim_signal_emit(gaim_blist_get_handle(), "buddy-signed-off", buddy); @@ -1354,9 +1358,9 @@ ops->update(gaimbuddylist, cnode); } else if(GAIM_BLIST_NODE_IS_CHAT(cnode) && ((GaimBlistChat*)cnode)->account == account) { - ((GaimGroup *)gnode)->online++; - ((GaimGroup *)gnode)->currentsize++; - ops->update(gaimbuddylist, cnode); + ((GaimGroup *)gnode)->online++; + ((GaimGroup *)gnode)->currentsize++; + ops->update(gaimbuddylist, cnode); } } ops->update(gaimbuddylist, gnode);