From 4a6b6aa45cdf0f804f98b6e435d54f32e830aa80 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 2 Jan 2005 03:14:34 +0000 Subject: [PATCH] Allow unsetting the custom image by passing NULL. (gtk_button_init): 2005-01-01 Matthias Clasen * 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) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkbutton.c | 3 ++- 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c0d9171581..eb3dac94df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-01-01 Matthias Clasen + + * 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 * gtk/gtkmodules.c (get_module_path) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c0d9171581..eb3dac94df 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2005-01-01 Matthias Clasen + + * 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 * gtk/gtkmodules.c (get_module_path) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c0d9171581..eb3dac94df 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2005-01-01 Matthias Clasen + + * 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 * gtk/gtkmodules.c (get_module_path) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c0d9171581..eb3dac94df 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2005-01-01 Matthias Clasen + + * 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 * gtk/gtkmodules.c (get_module_path) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 5d2297efd4..7785863ed8 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -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);