Mercurial > pidgin
comparison src/dialogs.c @ 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 | 3ccbdf8e7f8d |
children | 3f15ccb54f95 |
comparison
equal
deleted
inserted
replaced
4091:0c131a8ea3d1 | 4092:7edd02612086 |
---|---|
1106 /* End of account box */ | 1106 /* End of account box */ |
1107 | 1107 |
1108 bbox = gtk_hbox_new(FALSE, 5); | 1108 bbox = gtk_hbox_new(FALSE, 5); |
1109 gtk_box_pack_start(GTK_BOX(mainbox), bbox, TRUE, TRUE, 0); | 1109 gtk_box_pack_start(GTK_BOX(mainbox), bbox, TRUE, TRUE, 0); |
1110 | 1110 |
1111 add = picture_button(a->window, _("Add"), add_xpm); | |
1112 gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0); | |
1113 gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(do_add_buddy), a); | |
1114 | |
1111 cancel = picture_button(a->window, _("Cancel"), cancel_xpm); | 1115 cancel = picture_button(a->window, _("Cancel"), cancel_xpm); |
1112 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); | 1116 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); |
1113 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), a->window); | 1117 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), a->window); |
1114 | |
1115 add = picture_button(a->window, _("Add"), add_xpm); | |
1116 gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0); | |
1117 gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(do_add_buddy), a); | |
1118 | 1118 |
1119 gtk_widget_show_all(a->window); | 1119 gtk_widget_show_all(a->window); |
1120 if (group != NULL) | 1120 if (group != NULL) |
1121 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group); | 1121 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group); |
1122 } | 1122 } |
2076 | 2076 |
2077 bot = gtk_hbox_new(FALSE, 5); | 2077 bot = gtk_hbox_new(FALSE, 5); |
2078 gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 0); | 2078 gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 0); |
2079 gtk_widget_show(bot); | 2079 gtk_widget_show(bot); |
2080 | 2080 |
2081 b->save = picture_button(b->window, _("Save"), save_xpm); | |
2082 gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0); | |
2083 gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_set_dir), b); | |
2084 | |
2081 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); | 2085 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); |
2082 gtk_box_pack_end(GTK_BOX(bot), b->cancel, FALSE, FALSE, 0); | 2086 gtk_box_pack_end(GTK_BOX(bot), b->cancel, FALSE, FALSE, 0); |
2083 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); | 2087 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); |
2084 | |
2085 b->save = picture_button(b->window, _("Save"), save_xpm); | |
2086 gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0); | |
2087 gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_set_dir), b); | |
2088 | 2088 |
2089 gtk_window_set_focus(GTK_WINDOW(b->window), b->first); | 2089 gtk_window_set_focus(GTK_WINDOW(b->window), b->first); |
2090 | 2090 |
2091 gtk_widget_show(b->window); | 2091 gtk_widget_show(b->window); |
2092 } | 2092 } |
2199 /* Now do our row of buttons */ | 2199 /* Now do our row of buttons */ |
2200 hbox = gtk_hbox_new(FALSE, 5); | 2200 hbox = gtk_hbox_new(FALSE, 5); |
2201 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 0); | 2201 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 0); |
2202 gtk_widget_show(hbox); | 2202 gtk_widget_show(hbox); |
2203 | 2203 |
2204 b->ok = picture_button(b->window, _("OK"), ok_xpm); | |
2205 gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0); | |
2206 gtk_signal_connect(GTK_OBJECT(b->ok), "clicked", GTK_SIGNAL_FUNC(do_change_password), b); | |
2207 | |
2204 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); | 2208 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); |
2205 gtk_box_pack_end(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 0); | 2209 gtk_box_pack_end(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 0); |
2206 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); | 2210 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); |
2207 | |
2208 b->ok = picture_button(b->window, _("OK"), ok_xpm); | |
2209 gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0); | |
2210 gtk_signal_connect(GTK_OBJECT(b->ok), "clicked", GTK_SIGNAL_FUNC(do_change_password), b); | |
2211 | |
2212 | 2211 |
2213 gtk_widget_show(b->window); | 2212 gtk_widget_show(b->window); |
2214 } | 2213 } |
2215 | 2214 |
2216 void show_set_info(struct gaim_connection *gc) | 2215 void show_set_info(struct gaim_connection *gc) |
2258 | 2257 |
2259 buttons = gtk_hbox_new(FALSE, 5); | 2258 buttons = gtk_hbox_new(FALSE, 5); |
2260 gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0); | 2259 gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0); |
2261 gtk_widget_show(buttons); | 2260 gtk_widget_show(buttons); |
2262 | 2261 |
2262 b->save = picture_button(b->window, _("Save"), save_xpm); | |
2263 gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0); | |
2264 gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_save_info), b); | |
2265 | |
2263 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); | 2266 b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); |
2264 gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0); | 2267 gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0); |
2265 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); | 2268 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); |
2266 | |
2267 b->save = picture_button(b->window, _("Save"), save_xpm); | |
2268 gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0); | |
2269 gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_save_info), b); | |
2270 | 2269 |
2271 gtk_widget_show(b->window); | 2270 gtk_widget_show(b->window); |
2272 | 2271 |
2273 } | 2272 } |
2274 | 2273 |
3535 | 3534 |
3536 hbox = gtk_hbox_new(FALSE, 5); | 3535 hbox = gtk_hbox_new(FALSE, 5); |
3537 gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0); | 3536 gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0); |
3538 gtk_widget_show(hbox); | 3537 gtk_widget_show(hbox); |
3539 | 3538 |
3540 button = picture_button(ca->window, _("Cancel"), cancel_xpm); | 3539 button = picture_button(ca->window, _("Save"), ok_xpm); |
3541 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), ca->window); | 3540 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(save_away_mess), ca); |
3541 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
3542 | |
3543 button = picture_button(ca->window, _("Save & Use"), add_xpm); | |
3544 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(su_away_mess), ca); | |
3542 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3545 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3543 | 3546 |
3544 button = picture_button(ca->window, _("Use"), gnome_preferences_xpm); | 3547 button = picture_button(ca->window, _("Use"), gnome_preferences_xpm); |
3545 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(use_away_mess), ca); | 3548 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(use_away_mess), ca); |
3546 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3549 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3547 | 3550 |
3548 button = picture_button(ca->window, _("Save & Use"), add_xpm); | 3551 button = picture_button(ca->window, _("Cancel"), cancel_xpm); |
3549 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(su_away_mess), ca); | 3552 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), ca->window); |
3550 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
3551 | |
3552 button = picture_button(ca->window, _("Save"), ok_xpm); | |
3553 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(save_away_mess), ca); | |
3554 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3553 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3555 | 3554 |
3556 gtk_widget_show(ca->window); | 3555 gtk_widget_show(ca->window); |
3557 } | 3556 } |
3558 | 3557 |
3696 destroy_dialog(aliasdlg, aliasdlg); | 3695 destroy_dialog(aliasdlg, aliasdlg); |
3697 } | 3696 } |
3698 | 3697 |
3699 void alias_dialog_bud(struct buddy *b) | 3698 void alias_dialog_bud(struct buddy *b) |
3700 { | 3699 { |
3701 GtkWidget *frame; | |
3702 GtkWidget *vbox; | 3700 GtkWidget *vbox; |
3703 GtkWidget *bbox; | 3701 GtkWidget *bbox; |
3704 GtkWidget *cancel; | 3702 GtkWidget *cancel; |
3705 static GtkWidget *add = NULL; | 3703 static GtkWidget *add = NULL; |
3704 const char *name = g_malloc(80); | |
3706 GtkWidget *label; | 3705 GtkWidget *label; |
3707 GtkWidget *topbox; | 3706 GtkWidget *topbox; |
3708 static int a, c; | 3707 static int a, c; |
3709 | 3708 |
3710 if (aliasdlg) | 3709 if (aliasdlg) |
3714 gtk_window_set_policy(GTK_WINDOW(aliasdlg), FALSE, FALSE, TRUE); | 3713 gtk_window_set_policy(GTK_WINDOW(aliasdlg), FALSE, FALSE, TRUE); |
3715 gtk_window_set_role(GTK_WINDOW(aliasdlg), "alias_dialog"); | 3714 gtk_window_set_role(GTK_WINDOW(aliasdlg), "alias_dialog"); |
3716 gtk_widget_realize(aliasdlg); | 3715 gtk_widget_realize(aliasdlg); |
3717 dialogwindows = g_list_prepend(dialogwindows, aliasdlg); | 3716 dialogwindows = g_list_prepend(dialogwindows, aliasdlg); |
3718 | 3717 |
3719 bbox = gtk_hbox_new(TRUE, 10); | 3718 topbox = gtk_vbox_new(FALSE, 5); |
3720 topbox = gtk_hbox_new(FALSE, 5); | |
3721 vbox = gtk_vbox_new(FALSE, 5); | 3719 vbox = gtk_vbox_new(FALSE, 5); |
3722 | 3720 |
3723 aliasentry = gtk_entry_new(); | 3721 aliasentry = gtk_entry_new(); |
3724 aliasname = gtk_entry_new(); | 3722 aliasname = gtk_entry_new(); |
3725 /* Put the buttons in the box */ | 3723 |
3726 | 3724 /* Make the buddy name box */ |
3727 add = picture_button(aliasdlg, _("Alias"), add_xpm); | 3725 bbox = gtk_hbox_new(FALSE, 5); |
3728 | |
3729 cancel = picture_button(aliasdlg, _("Cancel"), cancel_xpm); | |
3730 | |
3731 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5); | |
3732 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5); | |
3733 | |
3734 frame = gtk_frame_new(NULL); | |
3735 gtk_frame_set_label(GTK_FRAME(frame), _("Alias Buddy")); | |
3736 | |
3737 label = gtk_label_new(_("Buddy")); | 3726 label = gtk_label_new(_("Buddy")); |
3727 gtk_widget_show(bbox); | |
3738 gtk_widget_show(label); | 3728 gtk_widget_show(label); |
3739 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); | 3729 gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 5); |
3740 gtk_box_pack_start(GTK_BOX(topbox), aliasentry, FALSE, FALSE, 5); | 3730 gtk_box_pack_end(GTK_BOX(bbox), aliasentry, FALSE, FALSE, 5); |
3741 gtk_entry_set_editable(GTK_ENTRY(aliasentry), FALSE); | 3731 gtk_entry_set_editable(GTK_ENTRY(aliasentry), FALSE); |
3732 gtk_box_pack_start(GTK_BOX(topbox), bbox, FALSE, FALSE, 0); | |
3733 | |
3734 /* And the buddy alias box */ | |
3735 bbox = gtk_hbox_new(FALSE, 5); | |
3742 label = gtk_label_new(_("Alias")); | 3736 label = gtk_label_new(_("Alias")); |
3737 gtk_widget_show(bbox); | |
3743 gtk_widget_show(label); | 3738 gtk_widget_show(label); |
3744 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); | 3739 gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 5); |
3745 gtk_box_pack_start(GTK_BOX(topbox), aliasname, FALSE, FALSE, 5); | 3740 gtk_box_pack_end(GTK_BOX(bbox), aliasname, FALSE, FALSE, 5); |
3741 gtk_box_pack_start(GTK_BOX(topbox), bbox, FALSE, FALSE, 0); | |
3746 | 3742 |
3747 gtk_entry_set_text(GTK_ENTRY(aliasentry), b->name); | 3743 gtk_entry_set_text(GTK_ENTRY(aliasentry), b->name); |
3748 gtk_entry_set_text(GTK_ENTRY(aliasname), b->show); | 3744 gtk_entry_set_text(GTK_ENTRY(aliasname), b->show); |
3745 | |
3746 /* Put the buttons in the box */ | |
3747 bbox = gtk_hbox_new(FALSE, 5); | |
3748 | |
3749 add = picture_button(aliasdlg, _("Alias"), add_xpm); | |
3750 cancel = picture_button(aliasdlg, _("Cancel"), cancel_xpm); | |
3751 gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0); | |
3752 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); | |
3749 | 3753 |
3750 /* And the boxes in the box */ | 3754 /* And the boxes in the box */ |
3751 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); | 3755 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); |
3752 gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5); | 3756 gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5); |
3753 | 3757 |
3762 gtk_widget_show(aliasentry); | 3766 gtk_widget_show(aliasentry); |
3763 gtk_widget_show(aliasname); | 3767 gtk_widget_show(aliasname); |
3764 gtk_widget_show(topbox); | 3768 gtk_widget_show(topbox); |
3765 gtk_widget_show(bbox); | 3769 gtk_widget_show(bbox); |
3766 gtk_widget_show(vbox); | 3770 gtk_widget_show(vbox); |
3767 gtk_widget_show(frame); | |
3768 gtk_window_set_title(GTK_WINDOW(aliasdlg), _("Gaim - Alias Buddy")); | 3771 gtk_window_set_title(GTK_WINDOW(aliasdlg), _("Gaim - Alias Buddy")); |
3769 gtk_window_set_focus(GTK_WINDOW(aliasdlg), aliasentry); | 3772 gtk_window_set_focus(GTK_WINDOW(aliasdlg), aliasname); |
3770 gtk_container_add(GTK_CONTAINER(frame), vbox); | 3773 gtk_container_add(GTK_CONTAINER(aliasdlg), vbox); |
3771 gtk_container_add(GTK_CONTAINER(aliasdlg), frame); | |
3772 gtk_container_set_border_width(GTK_CONTAINER(aliasdlg), 5); | 3774 gtk_container_set_border_width(GTK_CONTAINER(aliasdlg), 5); |
3773 gtk_widget_realize(aliasdlg); | 3775 gtk_widget_realize(aliasdlg); |
3774 | 3776 |
3775 gtk_widget_show(aliasdlg); | 3777 gtk_widget_show(aliasdlg); |
3776 } | 3778 } |