src/blist.c

changeset 10166
d87eed7d5744
parent 10087
e5b80a38939d
child 10205
efe6f0f708bd
equal deleted inserted replaced
10165:6fe2aeb442f6 10166:d87eed7d5744
1177 gnode = node->parent; 1177 gnode = node->parent;
1178 1178
1179 if (node->child) { 1179 if (node->child) {
1180 /* 1180 /*
1181 * If this contact has children then remove them. When the last 1181 * If this contact has children then remove them. When the last
1182 * buddy is removed from the contact, the contact is deleted. 1182 * buddy is removed from the contact, the contact is automatically
1183 * deleted.
1183 */ 1184 */
1184 while (node->child) { 1185 while (node->child->next) {
1185 gaim_blist_remove_buddy((GaimBuddy*)node->child); 1186 gaim_blist_remove_buddy((GaimBuddy*)node->child);
1186 } 1187 }
1188 /*
1189 * Remove the last buddy and trigger the deletion of the contact.
1190 * It would probably be cleaner if contact-deletion was done after
1191 * a timeout? Or if it had to be done manually, like below?
1192 */
1193 gaim_blist_remove_buddy((GaimBuddy*)node->child);
1187 } else { 1194 } else {
1188 /* Remove the node from its parent */ 1195 /* Remove the node from its parent */
1189 if (gnode->child == node) 1196 if (gnode->child == node)
1190 gnode->child = node->next; 1197 gnode->child = node->next;
1191 if (node->prev) 1198 if (node->prev)

mercurial