Mercurial > pidgin
changeset 6330:def96a62cd0d
[gaim-migrate @ 6829]
Updated the Add Group dialog.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 29 Jul 2003 06:27:13 +0000 |
parents | 418cc72136d1 |
children | b7f983d1392c |
files | src/dialogs.c |
diffstat | 1 files changed, 20 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Tue Jul 29 06:09:15 2003 +0000 +++ b/src/dialogs.c Tue Jul 29 06:27:13 2003 +0000 @@ -814,26 +814,6 @@ destroy_dialog(NULL, a->window); } -void do_add_group(GtkWidget *w, int resp, struct addbuddy *a) -{ - const char *grp; - struct group *g; - - if (resp == GTK_RESPONSE_OK) { - grp = gtk_entry_get_text(GTK_ENTRY(a->entry)); - - if (!a->gc) - a->gc = gaim_connections_get_all()->data; - - g = gaim_group_new(grp); - gaim_blist_add_group (g, NULL); - gaim_blist_save(); - } - - destroy_dialog(NULL, a->window); -} - - static GList *groups_tree() { GList *tmp = NULL; @@ -864,9 +844,26 @@ } -void show_add_group(GaimConnection *gc) +static void +add_group_cb(GaimConnection *gc, const char *group_name) { - + struct group *g; + + g = gaim_group_new(group_name); + gaim_blist_add_group(g, NULL); + gaim_blist_save(); +} + +void +show_add_group(GaimConnection *gc) +{ + gaim_request_input(NULL, _("Add Group"), _("Add a new group"), + _("Please enter the name of the group to be added."), + NULL, FALSE, FALSE, + _("Add"), G_CALLBACK(add_group_cb), + _("Cancel"), NULL, gc); + +#if 0 GtkWidget *hbox, *vbox; GtkWidget *label; struct gaim_gtk_buddy_list *gtkblist; @@ -915,6 +912,7 @@ gtk_widget_show_all(a->window); gtk_widget_grab_focus(GTK_WIDGET(a->entry)); +#endif } static void