changeset 4092:7edd02612086

[gaim-migrate @ 4307] (10:05:22) deryni: http://deryni.perlmonk.org/cancel-ok.patch <- all dialogs should be [Cancel] [Ok] now, and I redesigned the alias dialog because the buttons moved (10:05:35) LSchiere: is that the hig order? (10:05:57) deryni: that's the order faceprint didn't like the one Sean said the Get Info dialog did right (10:06:03) LSchiere: kay (10:06:13) deryni: with [Ok] on the right committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 17 Dec 2002 15:12:24 +0000
parents 0c131a8ea3d1
children 987624dcece4
files src/buddy_chat.c src/dialogs.c src/prpl.c
diffstat 3 files changed, 58 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy_chat.c	Tue Dec 17 11:03:44 2002 +0000
+++ b/src/buddy_chat.c	Tue Dec 17 15:12:24 2002 +0000
@@ -310,14 +310,14 @@
 		bbox = gtk_hbox_new(FALSE, 5);
 		gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0);
 
+		join = picture_button(joinchat, _("Join"), join_xpm);
+		gtk_box_pack_end(GTK_BOX(bbox), join, FALSE, FALSE, 0);
+		gtk_signal_connect(GTK_OBJECT(join), "clicked", GTK_SIGNAL_FUNC(do_join_chat), NULL);
+
 		cancel = picture_button(joinchat, _("Cancel"), cancel_xpm);
 		gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0);
 		gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
 				   GTK_SIGNAL_FUNC(destroy_join_chat), joinchat);
-
-		join = picture_button(joinchat, _("Join"), join_xpm);
-		gtk_box_pack_end(GTK_BOX(bbox), join, FALSE, FALSE, 0);
-		gtk_signal_connect(GTK_OBJECT(join), "clicked", GTK_SIGNAL_FUNC(do_join_chat), NULL);
 	}
 	gtk_widget_show_all(joinchat);
 }
--- a/src/dialogs.c	Tue Dec 17 11:03:44 2002 +0000
+++ b/src/dialogs.c	Tue Dec 17 15:12:24 2002 +0000
@@ -1108,14 +1108,14 @@
 	bbox = gtk_hbox_new(FALSE, 5);
 	gtk_box_pack_start(GTK_BOX(mainbox), bbox, TRUE, TRUE, 0);
 
+	add = picture_button(a->window, _("Add"), add_xpm);
+	gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0);
+	gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(do_add_buddy), a);
+
 	cancel = picture_button(a->window, _("Cancel"), cancel_xpm);
 	gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0);
 	gtk_signal_connect(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), a->window);
 
-	add = picture_button(a->window, _("Add"), add_xpm);
-	gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(do_add_buddy), a);
-
 	gtk_widget_show_all(a->window);
 	if (group != NULL) 
 		gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group);
@@ -2078,14 +2078,14 @@
 	gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 0);
 	gtk_widget_show(bot);
 
+	b->save = picture_button(b->window, _("Save"), save_xpm);
+	gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0);
+	gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_set_dir), b);
+
 	b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm);
 	gtk_box_pack_end(GTK_BOX(bot), b->cancel, FALSE, FALSE, 0);
 	gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window);
 
-	b->save = picture_button(b->window, _("Save"), save_xpm);
-	gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_set_dir), b);
-
 	gtk_window_set_focus(GTK_WINDOW(b->window), b->first);
 
 	gtk_widget_show(b->window);
@@ -2201,15 +2201,14 @@
 	gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 0);
 	gtk_widget_show(hbox);
 
+	b->ok = picture_button(b->window, _("OK"), ok_xpm);
+	gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0);
+	gtk_signal_connect(GTK_OBJECT(b->ok), "clicked", GTK_SIGNAL_FUNC(do_change_password), b);
+
 	b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm);
 	gtk_box_pack_end(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 0);
 	gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window);
 
-	b->ok = picture_button(b->window, _("OK"), ok_xpm);
-	gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(b->ok), "clicked", GTK_SIGNAL_FUNC(do_change_password), b);
-
-
 	gtk_widget_show(b->window);
 }
 
@@ -2260,14 +2259,14 @@
 	gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0);
 	gtk_widget_show(buttons);
 
+	b->save = picture_button(b->window, _("Save"), save_xpm);
+	gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0);
+	gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_save_info), b);
+
 	b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm);
 	gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0);
 	gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window);
 
-	b->save = picture_button(b->window, _("Save"), save_xpm);
-	gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_save_info), b);
-
 	gtk_widget_show(b->window);
 
 }
@@ -3537,20 +3536,20 @@
 	gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0);
 	gtk_widget_show(hbox);
 
-	button = picture_button(ca->window, _("Cancel"), cancel_xpm);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
+	button = picture_button(ca->window, _("Save"), ok_xpm);
+	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(save_away_mess), ca);
+	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+
+	button = picture_button(ca->window, _("Save & Use"), add_xpm);
+	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(su_away_mess), ca);
 	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 
 	button = picture_button(ca->window, _("Use"), gnome_preferences_xpm);
 	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(use_away_mess), ca);
 	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 
-	button = picture_button(ca->window, _("Save & Use"), add_xpm);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(su_away_mess), ca);
-	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
-
-	button = picture_button(ca->window, _("Save"), ok_xpm);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(save_away_mess), ca);
+	button = picture_button(ca->window, _("Cancel"), cancel_xpm);
+	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
 	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 
 	gtk_widget_show(ca->window);
@@ -3698,11 +3697,11 @@
 
 void alias_dialog_bud(struct buddy *b)
 {
-	GtkWidget *frame;
 	GtkWidget *vbox;
 	GtkWidget *bbox;
 	GtkWidget *cancel;
 	static GtkWidget *add = NULL;
+	const char *name = g_malloc(80);
 	GtkWidget *label;
 	GtkWidget *topbox;
 	static int a, c;
@@ -3716,37 +3715,42 @@
 	gtk_widget_realize(aliasdlg);
 	dialogwindows = g_list_prepend(dialogwindows, aliasdlg);
 
-	bbox = gtk_hbox_new(TRUE, 10);
-	topbox = gtk_hbox_new(FALSE, 5);
+	topbox = gtk_vbox_new(FALSE, 5);
 	vbox = gtk_vbox_new(FALSE, 5);
 
 	aliasentry = gtk_entry_new();
 	aliasname = gtk_entry_new();
-	/* Put the buttons in the box */
-
-	add = picture_button(aliasdlg, _("Alias"), add_xpm);
-
-	cancel = picture_button(aliasdlg, _("Cancel"), cancel_xpm);
-
-	gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5);
-	gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
-
-	frame = gtk_frame_new(NULL);
-	gtk_frame_set_label(GTK_FRAME(frame), _("Alias Buddy"));
-
+
+	/* Make the buddy name box */
+	bbox = gtk_hbox_new(FALSE, 5);
 	label = gtk_label_new(_("Buddy"));
+	gtk_widget_show(bbox);
 	gtk_widget_show(label);
-	gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
-	gtk_box_pack_start(GTK_BOX(topbox), aliasentry, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 5);
+	gtk_box_pack_end(GTK_BOX(bbox), aliasentry, FALSE, FALSE, 5);
 	gtk_entry_set_editable(GTK_ENTRY(aliasentry), FALSE);
+	gtk_box_pack_start(GTK_BOX(topbox), bbox, FALSE, FALSE, 0);
+
+	/* And the buddy alias box */
+	bbox = gtk_hbox_new(FALSE, 5);
 	label = gtk_label_new(_("Alias"));
+	gtk_widget_show(bbox);
 	gtk_widget_show(label);
-	gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
-	gtk_box_pack_start(GTK_BOX(topbox), aliasname, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 5);
+	gtk_box_pack_end(GTK_BOX(bbox), aliasname, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(topbox), bbox, FALSE, FALSE, 0);
 
 	gtk_entry_set_text(GTK_ENTRY(aliasentry), b->name);
 	gtk_entry_set_text(GTK_ENTRY(aliasname), b->show);
 
+	/* Put the buttons in the box */
+	bbox = gtk_hbox_new(FALSE, 5);
+
+	add = picture_button(aliasdlg, _("Alias"), add_xpm);
+	cancel = picture_button(aliasdlg, _("Cancel"), cancel_xpm);
+	gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0);
+
 	/* And the boxes in the box */
 	gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
 	gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5);
@@ -3764,11 +3768,9 @@
 	gtk_widget_show(topbox);
 	gtk_widget_show(bbox);
 	gtk_widget_show(vbox);
-	gtk_widget_show(frame);
 	gtk_window_set_title(GTK_WINDOW(aliasdlg), _("Gaim - Alias Buddy"));
-	gtk_window_set_focus(GTK_WINDOW(aliasdlg), aliasentry);
-	gtk_container_add(GTK_CONTAINER(frame), vbox);
-	gtk_container_add(GTK_CONTAINER(aliasdlg), frame);
+	gtk_window_set_focus(GTK_WINDOW(aliasdlg), aliasname);
+	gtk_container_add(GTK_CONTAINER(aliasdlg), vbox);
 	gtk_container_set_border_width(GTK_CONTAINER(aliasdlg), 5);
 	gtk_widget_realize(aliasdlg);
 
--- a/src/prpl.c	Tue Dec 17 11:03:44 2002 +0000
+++ b/src/prpl.c	Tue Dec 17 15:12:24 2002 +0000
@@ -273,14 +273,14 @@
 	hbox = gtk_hbox_new(FALSE, 5);
 	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
+	button = picture_button(window, _("Accept"), ok_xpm);
+	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(act_prompt), p);
+
 	button = picture_button(window, _("Cancel"), cancel_xpm);
 	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(des_win), window);
 
-	button = picture_button(window, _("Accept"), ok_xpm);
-	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(act_prompt), p);
-
 	gtk_widget_show_all(window);
 }