diff src/blist.c @ 6885:66dd420d3d23

[gaim-migrate @ 7431] Add support for removing groups in protocols. Currently, only MSN supports it, but you cannot delete group 0 (aka, "The evil ~ group of DOOM!"), so I'll add a GrossHack (TM) to not show that group if it's empty. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 18 Sep 2003 05:39:44 +0000
parents dd0eecfbe413
children b5fb1d5282e5
line wrap: on
line diff
--- a/src/blist.c	Thu Sep 18 02:56:04 2003 +0000
+++ b/src/blist.c	Thu Sep 18 05:39:44 2003 +0000
@@ -1102,6 +1102,7 @@
 {
 	struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
 	GaimBlistNode *node = (GaimBlistNode*)group;
+	GList *l;
 
 	if(node->child) {
 		char *buf;
@@ -1134,6 +1135,14 @@
 	if (node->next)
 		node->next->prev = node->prev;
 
+	for (l = gaim_connections_get_all(); l != NULL; l = l->next)
+	{
+		GaimConnection *gc = (GaimConnection *)l->data;
+
+		if (gaim_connection_get_state(gc) == GAIM_CONNECTED)
+			serv_remove_group(gc, group->name);
+	}
+
 	ops->remove(gaimbuddylist, node);
 	g_free(group->name);
 	g_free(group);