Mercurial > pidgin
comparison src/dialogs.c @ 459:fb1d671e168e
[gaim-migrate @ 469]
I know, I know -- I'm good. You don't have to keep telling me. :-)
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Sat, 01 Jul 2000 23:59:59 +0000 |
| parents | 4f09ffbd2a78 |
| children | be7cf1868b76 |
comparison
equal
deleted
inserted
replaced
| 458:4f09ffbd2a78 | 459:fb1d671e168e |
|---|---|
| 41 #include "gtkhtml.h" | 41 #include "gtkhtml.h" |
| 42 | 42 |
| 43 #include "pixmaps/cancel.xpm" | 43 #include "pixmaps/cancel.xpm" |
| 44 #include "pixmaps/save.xpm" | 44 #include "pixmaps/save.xpm" |
| 45 #include "pixmaps/ok.xpm" | 45 #include "pixmaps/ok.xpm" |
| 46 #include "pixmaps/add.xpm" | |
| 46 | 47 |
| 47 #define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" | 48 #define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" |
| 48 | 49 |
| 49 char *fontface; | 50 char *fontface; |
| 50 char *fontname; | 51 char *fontname; |
| 822 GtkWidget *label; | 823 GtkWidget *label; |
| 823 GtkWidget *bbox; | 824 GtkWidget *bbox; |
| 824 GtkWidget *vbox; | 825 GtkWidget *vbox; |
| 825 GtkWidget *topbox; | 826 GtkWidget *topbox; |
| 826 GtkWidget *frame; | 827 GtkWidget *frame; |
| 828 GtkWidget *icon_i; | |
| 829 GdkBitmap *mask; | |
| 830 GdkPixmap *icon; | |
| 831 GtkWidget *button_box; | |
| 827 | 832 |
| 828 struct addbuddy *a = g_new0(struct addbuddy, 1); | 833 struct addbuddy *a = g_new0(struct addbuddy, 1); |
| 829 | 834 |
| 830 a->window = gtk_window_new(GTK_WINDOW_DIALOG); | 835 a->window = gtk_window_new(GTK_WINDOW_DIALOG); |
| 831 dialogwindows = g_list_prepend(dialogwindows, a->window); | 836 gtk_widget_set_usize(a->window, 480, 105); |
| 832 cancel = gtk_button_new_with_label(_("Cancel")); | 837 gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE); |
| 833 add = gtk_button_new_with_label(_("Add")); | 838 gtk_widget_show(a->window); |
| 834 bbox = gtk_hbox_new(TRUE, 10); | 839 dialogwindows = g_list_prepend(dialogwindows, a->window); |
| 840 | |
| 841 bbox = gtk_hbox_new(TRUE, 10); | |
| 835 topbox = gtk_hbox_new(FALSE, 5); | 842 topbox = gtk_hbox_new(FALSE, 5); |
| 836 vbox = gtk_vbox_new(FALSE, 5); | 843 vbox = gtk_vbox_new(FALSE, 5); |
| 837 | 844 |
| 838 a->entry = gtk_entry_new(); | 845 a->entry = gtk_entry_new(); |
| 839 a->combo = gtk_combo_new(); | 846 a->combo = gtk_combo_new(); |
| 840 /* Fix the combo box */ | 847 /* Fix the combo box */ |
| 841 gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), groups_tree()); | 848 gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), groups_tree()); |
| 842 /* Put the buttons in the box */ | 849 /* Put the buttons in the box */ |
| 843 | 850 |
| 844 gtk_box_pack_start(GTK_BOX(bbox), add, TRUE, TRUE, 10); | 851 /* Build Add Button */ |
| 845 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10); | 852 |
| 853 add = gtk_button_new(); | |
| 854 | |
| 855 button_box = gtk_hbox_new(FALSE, 5); | |
| 856 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, add_xpm); | |
| 857 icon_i = gtk_pixmap_new(icon, mask); | |
| 858 | |
| 859 label = gtk_label_new(_("Add")); | |
| 860 | |
| 861 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); | |
| 862 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); | |
| 863 | |
| 864 gtk_widget_show(label); | |
| 865 gtk_widget_show(icon_i); | |
| 866 | |
| 867 gtk_widget_show(button_box); | |
| 868 | |
| 869 gtk_container_add(GTK_CONTAINER(add), button_box); | |
| 870 | |
| 871 /* End of OK Button */ | |
| 872 | |
| 873 /* Build Cancel Button */ | |
| 874 | |
| 875 cancel = gtk_button_new(); | |
| 876 | |
| 877 button_box = gtk_hbox_new(FALSE, 5); | |
| 878 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, cancel_xpm); | |
| 879 icon_i = gtk_pixmap_new(icon, mask); | |
| 880 | |
| 881 label = gtk_label_new(_("Cancel")); | |
| 882 | |
| 883 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); | |
| 884 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); | |
| 885 | |
| 886 gtk_widget_show(label); | |
| 887 gtk_widget_show(icon_i); | |
| 888 | |
| 889 gtk_widget_show(button_box); | |
| 890 | |
| 891 gtk_container_add(GTK_CONTAINER(cancel), button_box); | |
| 892 | |
| 893 /* End of Cancel Button */ | |
| 894 | |
| 895 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5); | |
| 896 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5); | |
| 846 | 897 |
| 847 frame = gtk_frame_new(NULL); | 898 frame = gtk_frame_new(NULL); |
| 848 gtk_frame_set_label(GTK_FRAME(frame), _("Add Buddy")); | 899 gtk_frame_set_label(GTK_FRAME(frame), _("Add Buddy")); |
| 849 | 900 |
| 850 label = gtk_label_new(_("Buddy")); | 901 label = gtk_label_new(_("Buddy")); |
| 862 if (group != NULL) | 913 if (group != NULL) |
| 863 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group); | 914 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group); |
| 864 | 915 |
| 865 /* And the boxes in the box */ | 916 /* And the boxes in the box */ |
| 866 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); | 917 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); |
| 867 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); | 918 gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5); |
| 868 | 919 |
| 869 /* Handle closes right */ | 920 /* Handle closes right */ |
| 870 gtk_signal_connect(GTK_OBJECT(a->window), "destroy", | 921 gtk_signal_connect(GTK_OBJECT(a->window), "destroy", |
| 871 GTK_SIGNAL_FUNC(destroy_dialog), a->window); | 922 GTK_SIGNAL_FUNC(destroy_dialog), a->window); |
| 872 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", | 923 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", |
