Mercurial > pidgin
comparison src/util.c @ 603:9b0717b4a490
[gaim-migrate @ 613]
picture_button(GtkWidget *window, char *text, char **xpm);
window is the window it will be drawn in.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 04 Aug 2000 04:08:31 +0000 |
parents | 7c75d69a1129 |
children | 50f7a0bc76fc |
comparison
equal
deleted
inserted
replaced
602:02ea095a972a | 603:9b0717b4a490 |
---|---|
886 c++; | 886 c++; |
887 } | 887 } |
888 cpy[cnt]='\0'; | 888 cpy[cnt]='\0'; |
889 return(cpy); | 889 return(cpy); |
890 } | 890 } |
891 | |
892 GtkWidget *picture_button(GtkWidget *window, char *text, char **xpm) | |
893 { | |
894 GtkWidget *button; | |
895 GtkWidget *button_box; | |
896 GtkWidget *label; | |
897 GdkBitmap *mask; | |
898 GdkPixmap *pm; | |
899 GtkWidget *pixmap; | |
900 | |
901 button = gtk_button_new(); | |
902 if (display_options & OPT_DISP_COOL_LOOK) | |
903 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
904 gtk_widget_show(button); | |
905 | |
906 button_box = gtk_hbox_new(FALSE, 5); | |
907 gtk_container_add(GTK_CONTAINER(button), button_box); | |
908 gtk_widget_show(button_box); | |
909 | |
910 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); | |
911 pixmap = gtk_pixmap_new(pm, mask); | |
912 gtk_box_pack_start(GTK_BOX(button_box), pixmap, FALSE, FALSE, 2); | |
913 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); | |
918 | |
919 gtk_widget_set_usize(button, 75, 30); | |
920 | |
921 return button; | |
922 } |