comparison pidgin/gtkblist.c @ 26283:31f0fece7502

propagate from branch 'im.pidgin.pidgin' (head d70375c084af2336e7fc6646fb778120b05de9a8) to branch 'im.pidgin.cpw.darkrain42.buddy-add' (head fa0c982c0252e44f0310912b9dc35ca8d6334b51)
author Paul Aurich <paul@darkrain42.org>
date Sat, 21 Mar 2009 03:49:51 +0000
parents c0115655a94e 9ea3474065dc
children e9b77a8bfde4
comparison
equal deleted inserted replaced
26281:b23211876f47 26283:31f0fece7502
6699 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias)); 6699 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias));
6700 if (*whoalias == '\0') 6700 if (*whoalias == '\0')
6701 whoalias = NULL; 6701 whoalias = NULL;
6702 6702
6703 g = NULL; 6703 g = NULL;
6704 if ((grp != NULL) && (*grp != '\0') && ((g = purple_find_group(grp)) == NULL)) 6704 if ((grp != NULL) && (*grp != '\0'))
6705 { 6705 {
6706 g = purple_group_new(grp); 6706 if ((g = purple_find_group(grp)) == NULL)
6707 purple_blist_add_group(g, NULL); 6707 {
6708 } 6708 g = purple_group_new(grp);
6709 6709 purple_blist_add_group(g, NULL);
6710 b = purple_buddy_new(data->account, who, whoalias); 6710 }
6711 purple_blist_add_buddy(b, NULL, g, NULL); 6711
6712 b = purple_find_buddy_in_group(data->account, who, g);
6713 }
6714 else if ((b = purple_find_buddy(data->account, who)) != NULL)
6715 {
6716 g = purple_buddy_get_group(b);
6717 }
6718
6719 if (b == NULL)
6720 {
6721 b = purple_buddy_new(data->account, who, whoalias);
6722 purple_blist_add_buddy(b, NULL, g, NULL);
6723 }
6724
6712 purple_account_add_buddy(data->account, b); 6725 purple_account_add_buddy(data->account, b);
6713 6726
6714 /* Offer to merge people with the same alias. */ 6727 /* Offer to merge people with the same alias. */
6715 if (whoalias != NULL && g != NULL) 6728 if (whoalias != NULL && g != NULL)
6716 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); 6729 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias);