Mercurial > pidgin.yaz
changeset 1699:644056e095f1
[gaim-migrate @ 1709]
adding a buddy doesn't cause a redraw of the edit buddies tab
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 12 Apr 2001 01:03:56 +0000 |
parents | 4c3bcc579e71 |
children | 1e0fa7e130d0 |
files | plugins/jabber/jabber.c src/buddy.c src/dialogs.c |
diffstat | 3 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/jabber/jabber.c Wed Apr 11 20:33:48 2001 +0000 +++ b/plugins/jabber/jabber.c Thu Apr 12 01:03:56 2001 +0000 @@ -625,7 +625,6 @@ jd->pending_chats = g_slist_remove(jd->pending_chats, pc->data); } else if (!(b = find_buddy(GJ_GC(j), buddy))) { b = add_buddy(GJ_GC(j), "Buddies", buddy, buddy); - build_edit_tree(); do_export(NULL, NULL); } } @@ -752,7 +751,6 @@ b = add_buddy(GJ_GC(j), groupname, buddyname, name ? name : buddyname); - build_edit_tree(); do_export(0, 0); } else { debug_printf("updating buddy: %s/%s\n", buddyname, name); @@ -776,7 +774,6 @@ buddyname = g_strdup_printf("%s@%s", who->user, who->server); if (strcasecmp(sub, "from") && !(b = find_buddy(GJ_GC(j), buddyname))) { b = add_buddy(GJ_GC(j), "Buddies", buddyname, name ? name : Jid); - build_edit_tree(); do_export(0, 0); } g_free(buddyname);
--- a/src/buddy.c Wed Apr 11 20:33:48 2001 +0000 +++ b/src/buddy.c Thu Apr 12 01:03:56 2001 +0000 @@ -909,8 +909,6 @@ add_buddy(pc, g->name, b->name, b->show); mem = mem->next; } - - build_edit_tree(); } } else { g = group; @@ -1016,6 +1014,9 @@ struct buddy *add_buddy(struct gaim_connection *gc, char *group, char *buddy, char *show) { + GtkCTreeNode *p = NULL, *n; + char *text[1]; + char buf[256]; struct buddy *b; struct group *g; struct group_show *gs = find_group_show(group); @@ -1046,6 +1047,19 @@ b->caps = 0; if (gs) update_num_group(gs); + + if (!blist) return b; + + p = gtk_ctree_find_by_row_data(GTK_CTREE(edittree), NULL, g); + if (strcmp(b->name, b->show)) { + g_snprintf(buf, sizeof(buf), "%s (%s)", b->name, b->show); + text[0] = buf; + } else + text[0] = b->name; + + n = gtk_ctree_insert_node(GTK_CTREE(edittree), p, NULL, text, 5, + NULL, NULL, NULL, NULL, 1, 1); + gtk_ctree_node_set_row_data(GTK_CTREE(edittree), n, b); return b; } @@ -2660,9 +2674,6 @@ if (bud != NULL) serv_add_buddies(gc, bud); serv_set_permit_deny(gc); - if (blist) { - build_edit_tree(); - } } /* perhaps the server dropped the buddy list, try importing from
--- a/src/dialogs.c Wed Apr 11 20:33:48 2001 +0000 +++ b/src/dialogs.c Thu Apr 12 01:03:56 2001 +0000 @@ -790,8 +790,6 @@ update_buttons_by_protocol(c); } - build_edit_tree(); - do_export( (GtkWidget *) NULL, 0 ); destroy_dialog(NULL, a->window); @@ -2970,8 +2968,6 @@ parse_toc_buddy_list(gc, buf, 1); - build_edit_tree(); - fclose( f ); if ( from_dialog ) {