# HG changeset patch # User Nathan Walp # Date 1051928403 0 # Node ID abd6d3abbe37749759de6617fb484847ba75d651 # Parent f82c251c8300f4eeadcf9f48a36bb1d7fcac7b2d [gaim-migrate @ 5659] lets see if we can get group numbers right for chats ;-) committer: Tailor Script diff -r f82c251c8300 -r abd6d3abbe37 src/blist.c --- a/src/blist.c Fri May 02 21:25:49 2003 +0000 +++ b/src/blist.c Sat May 03 02:20:03 2003 +0000 @@ -338,8 +338,10 @@ * being moved. */ ((struct group *)cnode->parent)->totalsize--; - if (chat->account->gc) + if (chat->account->gc) { + ((struct group *)cnode->parent)->online--; ((struct group *)cnode->parent)->currentsize--; + } if(cnode->next) cnode->next->prev = cnode->prev; if(cnode->prev) @@ -347,8 +349,6 @@ if(cnode->parent->child == cnode) cnode->parent->child = cnode->next; - ((struct group *)((GaimBlistNode *)chat)->parent)->online--; - ops->remove(gaimbuddylist, cnode); save = TRUE; @@ -362,19 +362,21 @@ cnode->parent = n->parent; n->next = cnode; ((struct group *)n->parent)->totalsize++; - if (chat->account->gc) + if (chat->account->gc) { + ((struct group *)n->parent)->online++; ((struct group *)n->parent)->currentsize++; + } } else { ((GaimBlistNode*)g)->child = cnode; cnode->next = cnode->prev = NULL; cnode->parent = (GaimBlistNode*)g; g->totalsize++; - if (chat->account->gc) + if (chat->account->gc) { + g->online++; g->currentsize++; + } } - ((struct group *)((GaimBlistNode *)chat)->parent)->online++; - if (ops) ops->update(gaimbuddylist, (GaimBlistNode*)cnode); if (save) @@ -726,6 +728,7 @@ } } else if(GAIM_BLIST_NODE_IS_CHAT(buddy)) { if (account == ((struct chat*)buddy)->account) { + ((struct group *)group)->online++; ((struct group *)group)->currentsize++; if(ops) ops->update(gaimbuddylist, buddy);