comparison src/dialogs.c @ 4397:ce3a0eba91ef

[gaim-migrate @ 4666] The add/remove button is fixed. Thanks ari. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 22 Jan 2003 23:20:09 +0000
parents 00f4fa7a93ff
children 31834b4598eb
comparison
equal deleted inserted replaced
4396:868ee63e1fe8 4397:ce3a0eba91ef
450 450
451 void do_remove_buddy(struct buddy *b) 451 void do_remove_buddy(struct buddy *b)
452 { 452 {
453 struct group *g = find_group_by_buddy(b); 453 struct group *g = find_group_by_buddy(b);
454 struct gaim_conversation *c; 454 struct gaim_conversation *c;
455 gchar *name = g_strdup(b->name); /* b->name is null after remove_buddy */
455 456
456 if (!b) 457 if (!b)
457 return; 458 return;
458 459
459 g = find_group_by_buddy(b); 460 g = find_group_by_buddy(b);
460 461
461 debug_printf(_("Removing '%s' from buddy list.\n"), b->name); 462 debug_printf(_("Removing '%s' from buddy list.\n"), b->name);
462 serv_remove_buddy(b->user->gc, b->name, g->name); 463 serv_remove_buddy(b->user->gc, name, g->name);
463 remove_buddy(b); 464 remove_buddy(b);
464 gaim_blist_save(); 465 gaim_blist_save();
465 466
466 c = gaim_find_conversation(b->name); 467 c = gaim_find_conversation(name);
467 468
468 if (c != NULL) 469 if (c != NULL)
469 gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE); 470 gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE);
471
472 g_free(name);
470 } 473 }
471 474
472 void show_confirm_del(struct gaim_connection *gc, gchar *name) 475 void show_confirm_del(struct gaim_connection *gc, gchar *name)
473 { 476 {
474 struct buddy *bd = find_buddy(gc->user, name); 477 struct buddy *bd = find_buddy(gc->user, name);