Mercurial > pidgin.yaz
comparison src/blist.c @ 12577:f1ee8a29bd69
[gaim-migrate @ 14899]
I need to be able to destroy GaimChats that aren't attached to a group.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 20 Dec 2005 09:41:34 +0000 |
parents | 18b16e801e6f |
children | 88ccc3603163 |
comparison
equal
deleted
inserted
replaced
12576:1246935dd047 | 12577:f1ee8a29bd69 |
---|---|
1828 | 1828 |
1829 node = (GaimBlistNode *)chat; | 1829 node = (GaimBlistNode *)chat; |
1830 gnode = node->parent; | 1830 gnode = node->parent; |
1831 group = (GaimGroup *)gnode; | 1831 group = (GaimGroup *)gnode; |
1832 | 1832 |
1833 /* Remove the node from its parent */ | 1833 if (gnode != NULL) |
1834 if (gnode->child == node) | 1834 { |
1835 gnode->child = node->next; | 1835 /* Remove the node from its parent */ |
1836 if (node->prev) | 1836 if (gnode->child == node) |
1837 node->prev->next = node->next; | 1837 gnode->child = node->next; |
1838 if (node->next) | 1838 if (node->prev) |
1839 node->next->prev = node->prev; | 1839 node->prev->next = node->next; |
1840 | 1840 if (node->next) |
1841 /* Adjust size counts */ | 1841 node->next->prev = node->prev; |
1842 if (gaim_account_is_connected(chat->account)) { | 1842 |
1843 group->online--; | 1843 /* Adjust size counts */ |
1844 group->currentsize--; | 1844 if (gaim_account_is_connected(chat->account)) { |
1845 } | 1845 group->online--; |
1846 group->totalsize--; | 1846 group->currentsize--; |
1847 | 1847 } |
1848 gaim_blist_schedule_save(); | 1848 group->totalsize--; |
1849 | |
1850 gaim_blist_schedule_save(); | |
1851 } | |
1849 | 1852 |
1850 /* Update the UI */ | 1853 /* Update the UI */ |
1851 if (ops && ops->remove) | 1854 if (ops && ops->remove) |
1852 ops->remove(gaimbuddylist, node); | 1855 ops->remove(gaimbuddylist, node); |
1853 | 1856 |