Mercurial > pidgin.yaz
changeset 2569:a714b8223228
[gaim-migrate @ 2582]
i fixed it for you.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 22 Oct 2001 00:58:13 +0000 |
parents | c2abbf94b93d |
children | 075011d08d1d |
files | src/buddy.c |
diffstat | 1 files changed, 7 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- 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()