Mercurial > pidgin
comparison src/util.c @ 619:faa7603ae02e
[gaim-migrate @ 629]
added more pixmaps and modified picture_button() so that they aren't spaced
all funny
committer: Tailor Script <tailor@pidgin.im>
author | Todd Kulesza <fflewddur> |
---|---|
date | Sat, 05 Aug 2000 19:22:41 +0000 |
parents | 50f7a0bc76fc |
children | 83b0caceea9a |
comparison
equal
deleted
inserted
replaced
618:ff7a04b30608 | 619:faa7603ae02e |
---|---|
890 } | 890 } |
891 | 891 |
892 GtkWidget *picture_button(GtkWidget *window, char *text, char **xpm) | 892 GtkWidget *picture_button(GtkWidget *window, char *text, char **xpm) |
893 { | 893 { |
894 GtkWidget *button; | 894 GtkWidget *button; |
895 GtkWidget *button_box; | 895 GtkWidget *button_box, *button_box_2, *button_box_3; |
896 GtkWidget *label; | 896 GtkWidget *label; |
897 GdkBitmap *mask; | 897 GdkBitmap *mask; |
898 GdkPixmap *pm; | 898 GdkPixmap *pm; |
899 GtkWidget *pixmap; | 899 GtkWidget *pixmap; |
900 | 900 |
901 button = gtk_button_new(); | 901 button = gtk_button_new(); |
902 if (display_options & OPT_DISP_COOL_LOOK) | 902 if (display_options & OPT_DISP_COOL_LOOK) |
903 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 903 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
904 gtk_widget_show(button); | |
905 | 904 |
906 button_box = gtk_hbox_new(FALSE, 5); | 905 button_box = gtk_hbox_new(FALSE, 5); |
907 gtk_container_add(GTK_CONTAINER(button), button_box); | 906 gtk_container_add(GTK_CONTAINER(button), button_box); |
908 gtk_widget_show(button_box); | 907 |
909 | 908 button_box_2 = gtk_hbox_new(FALSE, 0); |
909 button_box_3 = gtk_hbox_new(FALSE, 0); | |
910 gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); | |
911 gtk_box_pack_start(GTK_BOX(button_box), button_box_3, TRUE, TRUE, 0); | |
910 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); | 912 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); |
911 pixmap = gtk_pixmap_new(pm, mask); | 913 pixmap = gtk_pixmap_new(pm, mask); |
912 gtk_box_pack_start(GTK_BOX(button_box), pixmap, FALSE, FALSE, 2); | 914 gtk_box_pack_end(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); |
915 | |
916 label = gtk_label_new(text); | |
917 gtk_box_pack_start(GTK_BOX(button_box_3), label, FALSE, FALSE, 2); | |
918 | |
913 gtk_widget_show(pixmap); | 919 gtk_widget_show(pixmap); |
914 | |
915 label = gtk_label_new(text); | |
916 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); | |
917 gtk_widget_show(label); | 920 gtk_widget_show(label); |
918 | 921 gtk_widget_show(button_box_2); |
922 gtk_widget_show(button_box_3); | |
923 gtk_widget_show(button_box); | |
924 gtk_widget_show(button); | |
925 | |
919 return button; | 926 return button; |
920 } | 927 } |