[gtk+] image: use the default icon size if no icon size is provided



commit 58b1f24d6d8dab4b844cd8cba3d5888f1deb0510
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Nov 30 19:46:31 2011 -0500

    image: use the default icon size if no icon size is provided
    
    If no icon size is provided (e.g. when setting icon-name or stock-id
    using the GObject property directly), use the default icon size. This
    matches the previous GtkImage behavior.

 gtk/gtkimage.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 5f392de..2f12541 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -380,6 +380,9 @@ gtk_image_set_property (GObject      *object,
   GtkImagePrivate *priv = image->priv;
   GtkIconSize icon_size = _gtk_icon_helper_get_icon_size (priv->icon_helper);
 
+  if (icon_size == GTK_ICON_SIZE_INVALID)
+    icon_size = DEFAULT_ICON_SIZE;
+
   switch (prop_id)
     {
     case PROP_PIXBUF:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]