src/blist.c

changeset 6794
2c9fedb2c8a6
parent 6778
4f13d762b4ea
child 6803
4bd2e181b3ab
equal deleted inserted replaced
6793:f96cfd6ee8cd 6794:2c9fedb2c8a6
591 591
592 if(bnode->next) 592 if(bnode->next)
593 bnode->next->prev = bnode->prev; 593 bnode->next->prev = bnode->prev;
594 if(bnode->prev) 594 if(bnode->prev)
595 bnode->prev->next = bnode->next; 595 bnode->prev->next = bnode->next;
596 if(bnode->parent->child == bnode) { 596 if(bnode->parent->child == bnode)
597 bnode->parent->child = bnode->next; 597 bnode->parent->child = bnode->next;
598 if(!bnode->parent->child)
599 gaim_blist_remove_contact((GaimContact*)bnode->parent);
600 }
601 598
602 ops->remove(gaimbuddylist, bnode); 599 ops->remove(gaimbuddylist, bnode);
603 600
604 save = TRUE; 601 save = TRUE;
605 602
609 hb->account = buddy->account; 606 hb->account = buddy->account;
610 hb->group = bnode->parent->parent; 607 hb->group = bnode->parent->parent;
611 g_hash_table_remove(gaimbuddylist->buddies, hb); 608 g_hash_table_remove(gaimbuddylist->buddies, hb);
612 g_free(hb); 609 g_free(hb);
613 } 610 }
611
612 if(!bnode->parent->child)
613 gaim_blist_remove_contact((GaimContact*)bnode->parent);
614
614 } 615 }
615 616
616 if(node && GAIM_BLIST_NODE_IS_BUDDY(node)) { 617 if(node && GAIM_BLIST_NODE_IS_BUDDY(node)) {
617 if(node->next) 618 if(node->next)
618 node->next->prev = bnode; 619 node->next->prev = bnode;

mercurial