Commit 2ee17f48 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Simplify the code and respect the show-button-images setting. (#307941,

2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (button_new): Simplify
	the code and respect the show-button-images setting.
	(#307941, Vincent Noel)
parent 17441e5e
2005-06-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (button_new): Simplify
the code and respect the show-button-images setting.
(#307941, Vincent Noel)
* gtk/gtkdnd.c: Update the RGBA cursor if an
icon is set after the cursor has been constructed.
Also handle repeated setting of icons correctly.
......
2005-06-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (button_new): Simplify
the code and respect the show-button-images setting.
(#307941, Vincent Noel)
* gtk/gtkdnd.c: Update the RGBA cursor if an
icon is set after the cursor has been constructed.
Also handle repeated setting of icons correctly.
......
2005-06-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (button_new): Simplify
the code and respect the show-button-images setting.
(#307941, Vincent Noel)
* gtk/gtkdnd.c: Update the RGBA cursor if an
icon is set after the cursor has been constructed.
Also handle repeated setting of icons correctly.
......
......@@ -1874,29 +1874,15 @@ button_new (GtkFileChooserDefault *impl,
GCallback callback)
{
GtkWidget *button;
GtkWidget *hbox;
GtkWidget *widget;
GtkWidget *align;
button = gtk_button_new ();
hbox = gtk_hbox_new (FALSE, 2);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
GtkWidget *image;
gtk_container_add (GTK_CONTAINER (button), align);
gtk_container_add (GTK_CONTAINER (align), hbox);
widget = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
widget = gtk_label_new_with_mnemonic (text);
gtk_label_set_mnemonic_widget (GTK_LABEL (widget), GTK_WIDGET (button));
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
button = gtk_button_new_with_mnemonic (text);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), GTK_IMAGE (image));
gtk_widget_set_sensitive (button, sensitive);
g_signal_connect (button, "clicked", callback, impl);
gtk_widget_show_all (align);
if (show)
gtk_widget_show (button);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment