comparison pidgin/gtkblist.c @ 25465:9ea3474065dc

propagate from branch 'im.pidgin.pidgin' (head 303af74a38e7b313d4fb0be4d4054a16cb13d819) to branch 'im.pidgin.cpw.darkrain42.buddy-add' (head 8c6ff5a8cf91db250e9440fa0acab89d7fefe4ac)
author Paul Aurich <paul@darkrain42.org>
date Sat, 07 Mar 2009 01:23:51 +0000
parents 36f6f798e48a 0bb35311dfe0
children 31f0fece7502
comparison
equal deleted inserted replaced
25464:0e93bbb7f5ca 25465:9ea3474065dc
6714 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias)); 6714 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias));
6715 if (*whoalias == '\0') 6715 if (*whoalias == '\0')
6716 whoalias = NULL; 6716 whoalias = NULL;
6717 6717
6718 g = NULL; 6718 g = NULL;
6719 if ((grp != NULL) && (*grp != '\0') && ((g = purple_find_group(grp)) == NULL)) 6719 if ((grp != NULL) && (*grp != '\0'))
6720 { 6720 {
6721 g = purple_group_new(grp); 6721 if ((g = purple_find_group(grp)) == NULL)
6722 purple_blist_add_group(g, NULL); 6722 {
6723 } 6723 g = purple_group_new(grp);
6724 6724 purple_blist_add_group(g, NULL);
6725 b = purple_buddy_new(data->account, who, whoalias); 6725 }
6726 purple_blist_add_buddy(b, NULL, g, NULL); 6726
6727 b = purple_find_buddy_in_group(data->account, who, g);
6728 }
6729 else if ((b = purple_find_buddy(data->account, who)) != NULL)
6730 {
6731 g = purple_buddy_get_group(b);
6732 }
6733
6734 if (b == NULL)
6735 {
6736 b = purple_buddy_new(data->account, who, whoalias);
6737 purple_blist_add_buddy(b, NULL, g, NULL);
6738 }
6739
6727 purple_account_add_buddy(data->account, b); 6740 purple_account_add_buddy(data->account, b);
6728 6741
6729 /* Offer to merge people with the same alias. */ 6742 /* Offer to merge people with the same alias. */
6730 if (whoalias != NULL && g != NULL) 6743 if (whoalias != NULL && g != NULL)
6731 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); 6744 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias);