# HG changeset patch # User Eric Warmenhoven # Date 1003712293 0 # Node ID a714b822322899b8cfd098f973dcb0855a8fd178 # Parent c2abbf94b93d304a96cc178435bd80c0fcbdea97 [gaim-migrate @ 2582] i fixed it for you. committer: Tailor Script diff -r c2abbf94b93d -r a714b8223228 src/buddy.c --- a/src/buddy.c Sun Oct 21 19:49:20 2001 +0000 +++ b/src/buddy.c Mon Oct 22 00:58:13 2001 +0000 @@ -115,7 +115,7 @@ static GSList *shows = NULL; /* Predefine some functions */ -static void new_bp_callback(GtkWidget *w, struct buddy_show *bs); +static void new_bp_callback(GtkWidget *w, struct buddy *bs); static struct group_show *find_group_show(char *group); static struct buddy_show *find_buddy_show(struct group_show *gs, char *name); static int group_number(char *group); @@ -622,7 +622,8 @@ button = gtk_menu_item_new_with_label(_("Add Buddy Pounce")); gtk_signal_connect(GTK_OBJECT(button), "activate", - GTK_SIGNAL_FUNC(new_bp_callback), b); + GTK_SIGNAL_FUNC(new_bp_callback), + cn ? find_buddy(cn->data, b->name) : NULL); gtk_menu_append(GTK_MENU(menu), button); gtk_widget_show(button); @@ -1507,27 +1508,12 @@ g_free(who); } -static void new_bp_callback(GtkWidget *w, struct buddy_show *bs) +static void new_bp_callback(GtkWidget *w, struct buddy *b) { - struct gaim_connection *c = NULL; - struct buddy *b = NULL; - - if (bs) { - /* I really only care about the first account. If they've got multiple - * accounts in here then, as eric would say, butt fuck them. */ - c = (struct gaim_connection *)bs->connlist->data; - - b = find_buddy(c, bs->name); - - if (!b) { - /* What the hell? */ - return; - } - - show_new_bp(bs->name, c, b->idle, b->uc & UC_UNAVAILABLE); - } else { + if (b) + show_new_bp(b->name, b->gc, b->idle, b->uc & UC_UNAVAILABLE); + else show_new_bp(NULL, NULL, 0, 0); - } } void do_bp_menu()