Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 4915:0230df73f56a | 4916:d9b6b5ae34e4 |
|---|---|
| 439 gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE); | 439 gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE); |
| 440 | 440 |
| 441 g_free(name); | 441 g_free(name); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void do_remove_group(struct group *g) | |
| 445 { | |
| 446 GaimBlistNode *b = ((GaimBlistNode*)g)->child; | |
| 447 while (b) { | |
| 448 struct buddy *bd = (struct buddy *)b; | |
| 449 serv_remove_buddy(bd->account->gc, bd->name, g->name); | |
| 450 b = b->next; | |
| 451 } | |
| 452 gaim_blist_remove_group(g); | |
| 453 gaim_blist_save(); | |
| 454 } | |
| 455 | |
| 444 void show_confirm_del(struct gaim_connection *gc, gchar *name) | 456 void show_confirm_del(struct gaim_connection *gc, gchar *name) |
| 445 { | 457 { |
| 446 struct buddy *bd = gaim_find_buddy(gc->account, name); | 458 struct buddy *bd = gaim_find_buddy(gc->account, name); |
| 447 char *text; | 459 char *text; |
| 448 if (!bd) | 460 if (!bd) |
| 451 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), name); | 463 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), name); |
| 452 do_ask_dialog(_("Remove Buddy"), text, bd, _("Remove Buddy"), do_remove_buddy, _("Cancel"), NULL, NULL, FALSE); | 464 do_ask_dialog(_("Remove Buddy"), text, bd, _("Remove Buddy"), do_remove_buddy, _("Cancel"), NULL, NULL, FALSE); |
| 453 g_free(text); | 465 g_free(text); |
| 454 } | 466 } |
| 455 | 467 |
| 456 | 468 void show_confirm_del_group(struct group *g) |
| 469 { | |
| 470 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?"), | |
| 471 g->name); | |
| 472 do_ask_dialog(_("Remove Group"), text, g, _("Remove Buddy"), do_remove_group, _("Cancel"), NULL, NULL, FALSE); | |
| 473 g_free(text); | |
| 474 } | |
| 457 | 475 |
| 458 /*------------------------------------------------------------------------*/ | 476 /*------------------------------------------------------------------------*/ |
| 459 /* The dialog for getting an error */ | 477 /* The dialog for getting an error */ |
| 460 /*------------------------------------------------------------------------*/ | 478 /*------------------------------------------------------------------------*/ |
| 461 | 479 |
| 3920 while(accts) { | 3938 while(accts) { |
| 3921 struct gaim_account *account = accts->data; | 3939 struct gaim_account *account = accts->data; |
| 3922 serv_rename_group(account->gc, g, new_name); | 3940 serv_rename_group(account->gc, g, new_name); |
| 3923 accts = g_slist_remove(accts, accts->data); | 3941 accts = g_slist_remove(accts, accts->data); |
| 3924 } | 3942 } |
| 3925 g_snprintf(g->name, sizeof(g->name), "%s", new_name); | 3943 gaim_blist_rename_group(g, new_name); |
| 3926 gaim_blist_rename_group(g, prevname); | |
| 3927 g_free(prevname); | 3944 g_free(prevname); |
| 3928 } | 3945 } |
| 3929 gaim_blist_save(); | 3946 gaim_blist_save(); |
| 3930 } | 3947 } |
| 3931 } | 3948 } |
