comparison src/dialogs.c @ 3668:5b82f99d028d

[gaim-migrate @ 3798] Just getting some things set up committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 13 Oct 2002 23:06:22 +0000
parents 5b439da85c3b
children 0f468c22c702
comparison
equal deleted inserted replaced
3667:11ab2a5f6677 3668:5b82f99d028d
4581 gdk_window_raise(perl_config->window); 4581 gdk_window_raise(perl_config->window);
4582 } 4582 }
4583 4583
4584 #endif /* USE_PERL */ 4584 #endif /* USE_PERL */
4585 4585
4586 GtkWidget *gaim_pixbuf_toolbar_button_from_stock(char *icon)
4587 {
4588 GtkWidget *button, *image, *bbox;
4589
4590 button = gtk_toggle_button_new();
4591 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
4592
4593 bbox = gtk_vbox_new(FALSE, 0);
4594
4595 gtk_container_add (GTK_CONTAINER(button), bbox);
4596
4597 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_MENU);
4598 gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0);
4599
4600 gtk_widget_show_all(bbox);
4601 return button;
4602 }
4603
4604 GtkWidget *gaim_pixbuf_button_from_stock(char *text, char *icon, GaimButtonStyle style)
4605 {
4606 GtkWidget *button, *image, *label, *bbox;
4607 button = gtk_button_new();
4608
4609 if (style == GAIM_BUTTON_HORIZONTAL)
4610 bbox = gtk_hbox_new(FALSE, 5);
4611 else
4612 bbox = gtk_vbox_new(FALSE, 0);
4613
4614 gtk_container_add (GTK_CONTAINER(button), bbox);
4615
4616 if (icon) {
4617 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON);
4618 gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0);
4619 }
4620
4621 if (text) {
4622 label = gtk_label_new(NULL);
4623 gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text);
4624 gtk_label_set_mnemonic_widget(GTK_LABEL(label), button);
4625 gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0);
4626 }
4627
4628 gtk_widget_show_all(bbox);
4629 return button;
4630 }
4631
4586 GtkWidget *gaim_pixbuf_button(char *text, char *iconfile, GaimButtonStyle style) 4632 GtkWidget *gaim_pixbuf_button(char *text, char *iconfile, GaimButtonStyle style)
4587 { 4633 {
4588 GtkWidget *button, *image, *label, *bbox; 4634 GtkWidget *button, *image, *label, *bbox;
4589 button = gtk_button_new(); 4635 button = gtk_button_new();
4590 4636