Mercurial > pidgin
comparison src/blist.c @ 5287:abd6d3abbe37
[gaim-migrate @ 5659]
lets see if we can get group numbers right for chats ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 May 2003 02:20:03 +0000 |
parents | 1dcdc2504849 |
children | 436c83d60be0 |
comparison
equal
deleted
inserted
replaced
5286:f82c251c8300 | 5287:abd6d3abbe37 |
---|---|
336 if (cnode->parent) { | 336 if (cnode->parent) { |
337 /* This chat was already in the list and is | 337 /* This chat was already in the list and is |
338 * being moved. | 338 * being moved. |
339 */ | 339 */ |
340 ((struct group *)cnode->parent)->totalsize--; | 340 ((struct group *)cnode->parent)->totalsize--; |
341 if (chat->account->gc) | 341 if (chat->account->gc) { |
342 ((struct group *)cnode->parent)->online--; | |
342 ((struct group *)cnode->parent)->currentsize--; | 343 ((struct group *)cnode->parent)->currentsize--; |
344 } | |
343 if(cnode->next) | 345 if(cnode->next) |
344 cnode->next->prev = cnode->prev; | 346 cnode->next->prev = cnode->prev; |
345 if(cnode->prev) | 347 if(cnode->prev) |
346 cnode->prev->next = cnode->next; | 348 cnode->prev->next = cnode->next; |
347 if(cnode->parent->child == cnode) | 349 if(cnode->parent->child == cnode) |
348 cnode->parent->child = cnode->next; | 350 cnode->parent->child = cnode->next; |
349 | |
350 ((struct group *)((GaimBlistNode *)chat)->parent)->online--; | |
351 | 351 |
352 ops->remove(gaimbuddylist, cnode); | 352 ops->remove(gaimbuddylist, cnode); |
353 | 353 |
354 save = TRUE; | 354 save = TRUE; |
355 } | 355 } |
360 cnode->next = n->next; | 360 cnode->next = n->next; |
361 cnode->prev = n; | 361 cnode->prev = n; |
362 cnode->parent = n->parent; | 362 cnode->parent = n->parent; |
363 n->next = cnode; | 363 n->next = cnode; |
364 ((struct group *)n->parent)->totalsize++; | 364 ((struct group *)n->parent)->totalsize++; |
365 if (chat->account->gc) | 365 if (chat->account->gc) { |
366 ((struct group *)n->parent)->online++; | |
366 ((struct group *)n->parent)->currentsize++; | 367 ((struct group *)n->parent)->currentsize++; |
368 } | |
367 } else { | 369 } else { |
368 ((GaimBlistNode*)g)->child = cnode; | 370 ((GaimBlistNode*)g)->child = cnode; |
369 cnode->next = cnode->prev = NULL; | 371 cnode->next = cnode->prev = NULL; |
370 cnode->parent = (GaimBlistNode*)g; | 372 cnode->parent = (GaimBlistNode*)g; |
371 g->totalsize++; | 373 g->totalsize++; |
372 if (chat->account->gc) | 374 if (chat->account->gc) { |
375 g->online++; | |
373 g->currentsize++; | 376 g->currentsize++; |
374 } | 377 } |
375 | 378 } |
376 ((struct group *)((GaimBlistNode *)chat)->parent)->online++; | |
377 | 379 |
378 if (ops) | 380 if (ops) |
379 ops->update(gaimbuddylist, (GaimBlistNode*)cnode); | 381 ops->update(gaimbuddylist, (GaimBlistNode*)cnode); |
380 if (save) | 382 if (save) |
381 gaim_blist_save(); | 383 gaim_blist_save(); |
724 if(ops) | 726 if(ops) |
725 ops->update(gaimbuddylist, buddy); | 727 ops->update(gaimbuddylist, buddy); |
726 } | 728 } |
727 } else if(GAIM_BLIST_NODE_IS_CHAT(buddy)) { | 729 } else if(GAIM_BLIST_NODE_IS_CHAT(buddy)) { |
728 if (account == ((struct chat*)buddy)->account) { | 730 if (account == ((struct chat*)buddy)->account) { |
731 ((struct group *)group)->online++; | |
729 ((struct group *)group)->currentsize++; | 732 ((struct group *)group)->currentsize++; |
730 if(ops) | 733 if(ops) |
731 ops->update(gaimbuddylist, buddy); | 734 ops->update(gaimbuddylist, buddy); |
732 } | 735 } |
733 } | 736 } |