Mercurial > pidgin.yaz
changeset 5975:80e5258226f3
[gaim-migrate @ 6422]
I made some changes so that, if you have 2 buddies in your buddy list with
the same name, and you delete one by right clicking on it in the blist,
gaim will delete the one you right clicked rather than an arbitrary one.
I think the hash table that speeds up stuff in gtkblist.c has problems with
having the same buddy in a group twice. Someone should look into that.
Like, right now it treats buddy name/group name/account as a unique key,
but right now that is not a unique key.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 29 Jun 2003 20:57:28 +0000 |
parents | 1abc483f74c6 |
children | 7cce6643c51e |
files | src/dialogs.c src/gaim.h src/gtkconv.c src/protocols/oscar/oscar.c |
diffstat | 4 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Sun Jun 29 07:50:48 2003 +0000 +++ b/src/dialogs.c Sun Jun 29 20:57:28 2003 +0000 @@ -440,16 +440,15 @@ gaim_blist_save(); } -void show_confirm_del(GaimConnection *gc, gchar *name) +void show_confirm_del(struct buddy *b) { - struct buddy *bd = gaim_find_buddy(gc->account, name); char *text; - if (!bd) + if (!b) return; - text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), name); - - gaim_request_action(NULL, NULL, _("Remove Buddy"), text, -1, bd, 2, + text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), b->name); + + gaim_request_action(NULL, NULL, _("Remove Buddy"), text, -1, b, 2, _("Remove Buddy"), G_CALLBACK(do_remove_buddy), _("Cancel"), NULL);
--- a/src/gaim.h Sun Jun 29 07:50:48 2003 +0000 +++ b/src/gaim.h Sun Jun 29 20:57:28 2003 +0000 @@ -46,7 +46,7 @@ extern void show_find_email(GaimConnection *); extern void show_find_info(GaimConnection *); extern void show_set_info(GaimConnection *); -extern void show_confirm_del(GaimConnection *, gchar *); +extern void show_confirm_del(struct buddy *); extern void show_confirm_del_group(struct group *); extern void show_confirm_del_chat(struct chat *);
--- a/src/gtkconv.c Sun Jun 29 07:50:48 2003 +0000 +++ b/src/gtkconv.c Sun Jun 29 20:57:28 2003 +0000 @@ -444,7 +444,7 @@ b = gaim_find_buddy(gc->account, name); if (b != NULL) - show_confirm_del(gc, (char *)name); + show_confirm_del(b); else if (gc != NULL) show_add_buddy(gc, (char *)name, NULL, NULL); @@ -981,7 +981,7 @@ b = gaim_find_buddy(gc->account, name); if (b != NULL) - show_confirm_del(gc, name); + show_confirm_del(b); else if (gc != NULL) show_add_buddy(gc, name, NULL, NULL);
--- a/src/protocols/oscar/oscar.c Sun Jun 29 07:50:48 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sun Jun 29 20:57:28 2003 +0000 @@ -5853,7 +5853,10 @@ #endif } else { struct buddy *b = gaim_find_buddy(gc->account, who); - struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, normalize(b->name)); + struct buddyinfo *bi; + + if (b) + bi = g_hash_table_lookup(od->buddyinfo, normalize(b->name)); if (b && bi && aim_sncmp(gaim_account_get_username(gaim_connection_get_account(gc)), who) && GAIM_BUDDY_IS_ONLINE(b)) { if (bi->caps & AIM_CAPS_IMIMAGE) { @@ -6014,6 +6017,7 @@ g_free(text); } +#if 0 static void oscar_setavailmsg(GaimConnection *gc, char *text) { struct oscar_data *od = (struct oscar_data *)gc->proto_data; @@ -6028,6 +6032,7 @@ _("Cancel"), NULL, gc); } +#endif static void oscar_show_chpassurl(GaimConnection *gc) {