Mercurial > pidgin.yaz
diff pidgin/gtkblist.c @ 24509:125cac3e24ee
The Add Buddy dialog should not blindly create a duplicate buddy in a group
Fix up a subset of the prpls add_buddy functions to properly handle
this situation.
* Everything that comes before oscar alphabetically should work properly
(except Gadu-Gadu and MSN, which need testing/another set of eyes)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 29 Nov 2008 18:46:49 +0000 |
parents | f10aba5592c6 |
children | 401f548e3544 |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Sat Nov 29 18:20:58 2008 +0000 +++ b/pidgin/gtkblist.c Sat Nov 29 18:46:49 2008 +0000 @@ -6495,8 +6495,12 @@ purple_blist_add_group(g, NULL); } - b = purple_buddy_new(data->account, who, whoalias); - purple_blist_add_buddy(b, NULL, g, NULL); + if ((b = purple_find_buddy_in_group(data->account, who, g)) == NULL) + { + b = purple_buddy_new(data->account, who, whoalias); + purple_blist_add_buddy(b, NULL, g, NULL); + } + purple_account_add_buddy(data->account, b); /* Offer to merge people with the same alias. */