Mercurial > pidgin
changeset 1663:0f7d2284296f
[gaim-migrate @ 1673]
good fixes.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 30 Mar 2001 11:13:33 +0000 |
parents | 88e72116639d |
children | 5755711e7f58 |
files | src/buddy.c src/conversation.c src/dialogs.c src/toc.c |
diffstat | 4 files changed, 37 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Fri Mar 30 10:50:06 2001 +0000 +++ b/src/buddy.c Fri Mar 30 11:13:33 2001 +0000 @@ -1053,6 +1053,8 @@ struct group *add_group(struct gaim_connection *gc, char *group) { + GtkCTreeNode *c = NULL, *p; + char *text[1]; struct group *g = find_group(gc, group); if (g) return g; @@ -1069,7 +1071,12 @@ if (!blist) return g; - build_edit_tree(); + c = gtk_ctree_find_by_row_data(GTK_CTREE(edittree), NULL, gc); + text[0] = g->name; + p = gtk_ctree_insert_node(GTK_CTREE(edittree), c, + NULL, text, 5, NULL, NULL, + NULL, NULL, 0, 1); + gtk_ctree_node_set_row_data(GTK_CTREE(edittree), p, g); if (!(display_options & OPT_DISP_NO_MT_GRP) && !find_group_show(group)) new_group_show(group);
--- a/src/conversation.c Fri Mar 30 10:50:06 2001 +0000 +++ b/src/conversation.c Fri Mar 30 11:13:33 2001 +0000 @@ -1722,36 +1722,43 @@ { int dispstyle = set_dispstyle(0); GtkWidget *parent = c->add->parent; - gtk_widget_destroy(c->add); + gboolean rebuild = FALSE; if (find_buddy(c->gc, c->name)) { - c->add = picture_button2(c->window, _("Remove"), gnome_remove_xpm, dispstyle); - - if (c->gc) - { + if (!gtk_object_get_user_data(GTK_OBJECT(c->add))) { + gtk_widget_destroy(c->add); + c->add = picture_button2(c->window, _("Remove"), gnome_remove_xpm, dispstyle); + rebuild = TRUE; + } + if (c->gc) { if (c->gc->prpl->remove_buddy == NULL) gtk_widget_set_sensitive(c->add, FALSE); else gtk_widget_set_sensitive(c->add, TRUE); - } + } else + gtk_widget_set_sensitive(c->add, FALSE); + gtk_object_set_user_data(GTK_OBJECT(c->add), c); } else { - c->add = picture_button2(c->window, _("Add"), gnome_add_xpm, dispstyle); - if (c->gc) - { + if (gtk_object_get_user_data(GTK_OBJECT(c->add))) { + gtk_widget_destroy(c->add); + c->add = picture_button2(c->window, _("Add"), gnome_add_xpm, dispstyle); + rebuild = TRUE; + } + if (c->gc) { if (c->gc->prpl->add_buddy == NULL) gtk_widget_set_sensitive(c->add, FALSE); else gtk_widget_set_sensitive(c->add, TRUE); - } + } else + gtk_widget_set_sensitive(c->add, FALSE); } - if (!c->gc) - gtk_widget_set_sensitive(c->add, FALSE); - - gtk_signal_connect(GTK_OBJECT(c->add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); - gtk_box_pack_end(GTK_BOX(parent), c->add, dispstyle, dispstyle, 0); - gtk_box_reorder_child(GTK_BOX(parent), c->add, 2); - gtk_widget_show(c->add); + if (rebuild) { + gtk_signal_connect(GTK_OBJECT(c->add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); + gtk_box_pack_end(GTK_BOX(parent), c->add, dispstyle, dispstyle, 0); + gtk_box_reorder_child(GTK_BOX(parent), c->add, 2); + gtk_widget_show(c->add); + } } static void create_convo_menu(struct conversation *cnv) @@ -2050,9 +2057,10 @@ gtk_box_pack_end(GTK_BOX(bbox), c->sep1, dispstyle, dispstyle, 0); gtk_widget_show(c->sep1); - if (c->gc && find_buddy(c->gc, c->name) != NULL) - add = picture_button2(win, _("Remove"), gnome_remove_xpm, dispstyle); - else + if (c->gc && find_buddy(c->gc, c->name) != NULL) { + add = picture_button2(win, _("Remove"), gnome_remove_xpm, dispstyle); + gtk_object_set_user_data(GTK_OBJECT(add), c); + } else add = picture_button2(win, _("Add"), gnome_add_xpm, dispstyle); c->add = add; gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(add_callback), c);
--- a/src/dialogs.c Fri Mar 30 10:50:06 2001 +0000 +++ b/src/dialogs.c Fri Mar 30 11:13:33 2001 +0000 @@ -804,8 +804,6 @@ if (a->gc) add_group(a->gc, grp); else if (connections) add_group(connections->data, grp); - build_edit_tree(); - do_export( (GtkWidget *) NULL, 0 ); destroy_dialog(NULL, a->window);
--- a/src/toc.c Fri Mar 30 10:50:06 2001 +0000 +++ b/src/toc.c Fri Mar 30 11:13:33 2001 +0000 @@ -135,7 +135,7 @@ gc = new_gaim_conn(user); gc->proto_data = tdt = g_new0(struct toc_data, 1); - g_snprintf(buf, sizeof buf, "Lookin up %s", + g_snprintf(buf, sizeof buf, "Looking up %s", user->proto_opt[USEROPT_AUTH][0] ? user->proto_opt[USEROPT_AUTH] : TOC_HOST); /* this is such a hack */ set_login_progress(gc, 1, buf);