changeset 654:ea811c6dd3e0

[gaim-migrate @ 664] with all this hacking i'm surprised we don't ever get through the log committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 10 Aug 2000 04:13:46 +0000
parents c8a3bf382108
children 6ba20a0089d8
files src/conversation.c src/dialogs.c
diffstat 2 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Thu Aug 10 01:01:47 2000 +0000
+++ b/src/conversation.c	Thu Aug 10 04:13:46 2000 +0000
@@ -459,11 +459,17 @@
 void add_callback(GtkWidget *widget, struct conversation *c)
 {
 	if (find_buddy(c->name) != NULL) {
+		GtkWidget *parent = c->add_button->parent;
 		sprintf(debug_buff,_("Removing '%s' from buddylist.\n"), c->name);
 		debug_print(debug_buff);
 		remove_buddy(find_group_by_buddy(c->name), find_buddy(c->name));
 		build_edit_tree();
-/* FIXME !	gtk_label_set_text(GTK_LABEL(GTK_BIN(c->add_button)->child), _("Add")); */
+		gtk_widget_destroy(c->add_button);
+		c->add_button = picture_button2(c->window, NULL, gnome_add_xpm);
+		gtk_signal_connect(GTK_OBJECT(c->add_button), "clicked", GTK_SIGNAL_FUNC(add_callback), c);
+		gtk_box_pack_end(GTK_BOX(parent), c->add_button, FALSE, FALSE, 0);
+		gtk_box_reorder_child(GTK_BOX(parent), c->add_button, 1);
+		gtk_widget_show(c->add_button);
 	}
 	else
 	{
--- a/src/dialogs.c	Thu Aug 10 01:01:47 2000 +0000
+++ b/src/dialogs.c	Thu Aug 10 04:13:46 2000 +0000
@@ -45,6 +45,7 @@
 #include "pixmaps/ok.xpm"
 #include "pixmaps/add.xpm"
 #include "pixmaps/warn.xpm"
+#include "pixmaps/gnome_remove.xpm"
 
 #include "pixmaps/angel.xpm"
 #include "pixmaps/bigsmile.xpm"
@@ -755,6 +756,8 @@
 /*  The dialog for adding buddies                                         */
 /*------------------------------------------------------------------------*/
 
+extern void add_callback(GtkWidget *, struct conversation *);
+
 void do_add_buddy(GtkWidget *w, struct addbuddy *a)
 {
 	char *grp, *who;
@@ -767,10 +770,15 @@
 
         add_buddy(grp, who);
 
-/* FIXME ! pixmaps now
-        if (c != NULL)
-		gtk_label_set_text(GTK_LABEL(GTK_BIN(c->add_button)->child), _("Remove"));
-*/
+        if (c != NULL) {
+		GtkWidget *parent = c->add_button->parent;
+		gtk_widget_destroy(c->add_button);
+		c->add_button = picture_button2(c->window, NULL, gnome_remove_xpm);
+		gtk_signal_connect(GTK_OBJECT(c->add_button), "clicked", GTK_SIGNAL_FUNC(add_callback), c);
+		gtk_box_pack_end(GTK_BOX(parent), c->add_button, FALSE, FALSE, 0);
+		gtk_box_reorder_child(GTK_BOX(parent), c->add_button, 1);
+		gtk_widget_show(c->add_button);
+	}
         
         build_edit_tree();