Mercurial > pidgin
diff src/dialogs.c @ 4916:d9b6b5ae34e4
[gaim-migrate @ 5250]
Buddy list editing.
Does this work? I don't know; I don't test things. It compiles though.
It probably does work though, because I'm perfect.
So, see, I did really terribly in school last semester (really terribly--
like, why didn't they kick me out terribly) and so I'm working really hard
to do well this semester (and I am so far :)). Anyway, that's why you may
have noticed I'm a bit slow with the development of late. In fact, I would
test and fix this stuff up, but I really need to work on an English paper,
so I figured it'd be best just to commit it as is and let Rob, Nathan, Chip
and the boys work out the kinks. Besides, I've had most of this code written
for weeks already.
Thank you all for your patience.
Oh, so there's now an Edit menu on your buddy list (which makes the minimum
buddy list width wider :-D) and here you'll find things with which to edit
your list and privacy, prefs and accounts. It should all be real intuitive.
Feel free to IM me if you want to talk about my paper.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 31 Mar 2003 07:19:46 +0000 |
parents | f98467b35b95 |
children | 553d96cb9b26 |
line wrap: on
line diff
--- a/src/dialogs.c Mon Mar 31 02:38:44 2003 +0000 +++ b/src/dialogs.c Mon Mar 31 07:19:46 2003 +0000 @@ -441,6 +441,18 @@ g_free(name); } +void do_remove_group(struct group *g) +{ + GaimBlistNode *b = ((GaimBlistNode*)g)->child; + while (b) { + struct buddy *bd = (struct buddy *)b; + serv_remove_buddy(bd->account->gc, bd->name, g->name); + b = b->next; + } + gaim_blist_remove_group(g); + gaim_blist_save(); +} + void show_confirm_del(struct gaim_connection *gc, gchar *name) { struct buddy *bd = gaim_find_buddy(gc->account, name); @@ -453,7 +465,13 @@ g_free(text); } - +void show_confirm_del_group(struct group *g) +{ + char *text = g_strdup_printf(_("You are about to remove he group %s and all its members from your buddy list. Do you want to continue?"), + g->name); + do_ask_dialog(_("Remove Group"), text, g, _("Remove Buddy"), do_remove_group, _("Cancel"), NULL, NULL, FALSE); + g_free(text); +} /*------------------------------------------------------------------------*/ /* The dialog for getting an error */ @@ -3922,8 +3940,7 @@ serv_rename_group(account->gc, g, new_name); accts = g_slist_remove(accts, accts->data); } - g_snprintf(g->name, sizeof(g->name), "%s", new_name); - gaim_blist_rename_group(g, prevname); + gaim_blist_rename_group(g, new_name); g_free(prevname); } gaim_blist_save();