From: Nathan W. <fac...@us...> - 2003-09-21 16:15:00
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv26777/src Modified Files: blist.c Log Message: fix the incorrect group online counts Index: blist.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/blist.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -p -r1.77 -r1.78 --- blist.c 18 Sep 2003 07:11:55 -0000 1.77 +++ blist.c 21 Sep 2003 16:14:50 -0000 1.78 @@ -258,12 +258,16 @@ void gaim_blist_update_buddy_presence(Ga 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 @@ void gaim_blist_add_account(GaimAccount 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); |