Allow unsetting the custom image by passing NULL. (gtk_button_init):

2005-01-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
	custom image by passing NULL.
	(gtk_button_init): Initialize image_is_stock to TRUE, fixing
	a problem with changing stock labels.  (#162273, Marcin
	Krzyzanowski)
This commit is contained in:
Matthias Clasen
2005-01-02 03:14:34 +00:00
committed by Matthias Clasen
parent 7d5e882c75
commit 4a6b6aa45c
5 changed files with 34 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
2005-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
custom image by passing NULL.
(gtk_button_init): Initialize image_is_stock to TRUE, fixing
a problem with changing stock labels. (#162273, Marcin
Krzyzanowski)
2005-01-01 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmodules.c (get_module_path)

View File

@@ -1,3 +1,11 @@
2005-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
custom image by passing NULL.
(gtk_button_init): Initialize image_is_stock to TRUE, fixing
a problem with changing stock labels. (#162273, Marcin
Krzyzanowski)
2005-01-01 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmodules.c (get_module_path)

View File

@@ -1,3 +1,11 @@
2005-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
custom image by passing NULL.
(gtk_button_init): Initialize image_is_stock to TRUE, fixing
a problem with changing stock labels. (#162273, Marcin
Krzyzanowski)
2005-01-01 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmodules.c (get_module_path)

View File

@@ -1,3 +1,11 @@
2005-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
custom image by passing NULL.
(gtk_button_init): Initialize image_is_stock to TRUE, fixing
a problem with changing stock labels. (#162273, Marcin
Krzyzanowski)
2005-01-01 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmodules.c (get_module_path)

View File

@@ -445,6 +445,7 @@ gtk_button_init (GtkButton *button)
priv->xalign = 0.5;
priv->yalign = 0.5;
priv->align_set = 0;
priv->image_is_stock = TRUE;
}
static void
@@ -1757,7 +1758,7 @@ gtk_button_set_image (GtkButton *button,
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
priv->image = image;
priv->image_is_stock = FALSE;
priv->image_is_stock = (image == NULL);
gtk_button_construct_child (button);