[gtk+/gtk-2-18] Make setting the icon-size property on GTK_IMAGE_GICON images work



commit 79f1257732ab3ec7098155939c8dc0018921d942
Author: Christian Persch <chpe gnome org>
Date:   Mon Nov 23 14:33:08 2009 +0100

    Make setting the icon-size property on GTK_IMAGE_GICON images work
    
    Bug #602725.
    (cherry picked from commit ba218a77892739a3668a3369370afb5d41de8c03)

 gtk/gtkimage.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 4d80267..6c53d30 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -361,8 +361,12 @@ gtk_image_set_property (GObject      *object,
         gtk_image_set_from_icon_name (image,
 				      image->data.name.icon_name,
 				      g_value_get_int (value));
+      else if (image->storage_type == GTK_IMAGE_GICON)
+        gtk_image_set_from_gicon (image,
+                                  image->data.gicon.icon,
+                                  g_value_get_int (value));
       else
-        /* Save to be used when STOCK or ICON_SET property comes in */
+        /* Save to be used when STOCK, ICON_SET, ICON_NAME or GICON property comes in */
         image->icon_size = g_value_get_int (value);
       break;
     case PROP_PIXEL_SIZE:



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