Index: gtk/gtkicontheme.c
===================================================================
--- gtk/gtkicontheme.c	(revision 19748)
+++ gtk/gtkicontheme.c	(working copy)
@@ -113,6 +113,8 @@
    */
   gchar *cp_filename;
 #endif
+  GLoadableIcon *loadable;
+
   /* Cache pixbuf (if there is any) */
   GdkPixbuf *cache_pixbuf;
 
@@ -128,7 +130,8 @@
   /* Parameters influencing the scaled icon
    */
   gint desired_size;
-  gboolean raw_coordinates;
+  guint raw_coordinates : 1;
+  guint forced_size     : 1;
 
   /* Cached information if we go ahead and try to load
    * the icon.
@@ -136,6 +139,8 @@
   GdkPixbuf *pixbuf;
   GError *load_error;
   gdouble scale;
+
+  guint ref_count;
 };
 
 typedef struct
@@ -1293,11 +1298,15 @@
 #endif
 
       icon_info->dir_type = ICON_THEME_DIR_UNTHEMED;
+      icon_info->dir_size = size;
     }
 
  out:
-  if (icon_info)
-    icon_info->desired_size = size;
+  if (icon_info) 
+    {
+      icon_info->desired_size = size;
+      icon_info->forced_size = (flags & GTK_ICON_LOOKUP_FORCE_SIZE) != 0;
+    }
   else
     {
       static gboolean check_for_default_theme = TRUE;
@@ -2577,6 +2586,7 @@
   GtkIconInfo *icon_info = g_slice_new0 (GtkIconInfo);
 
   icon_info->scale = -1.;
+  icon_info->ref_count = 1;
 
   return icon_info;
 }
@@ -2590,7 +2600,7 @@
   icon_info->dir_type = ICON_THEME_DIR_THRESHOLD;
   icon_info->dir_size = icon->size;
   icon_info->threshold = 2;
-  
+
   return icon_info;
 }
 
@@ -2607,26 +2617,12 @@
 GtkIconInfo *
 gtk_icon_info_copy (GtkIconInfo *icon_info)
 {
-  GtkIconInfo *copy;
   
   g_return_val_if_fail (icon_info != NULL, NULL);
 
-  copy = g_slice_dup (GtkIconInfo, icon_info);
+  icon_info->ref_count++;
 
-  if (copy->cache_pixbuf)
-    g_object_ref (copy->cache_pixbuf);
-  if (copy->pixbuf)
-    g_object_ref (copy->pixbuf);
-  if (copy->load_error)
-    copy->load_error = g_error_copy (copy->load_error);
-  if (copy->filename)
-    copy->filename = g_strdup (copy->filename);
-#ifdef G_OS_WIN32
-  if (copy->cp_filename)
-    copy->cp_filename = g_strdup (copy->cp_filename);
-#endif
-
-  return copy;
+  return icon_info;
 }
 
 /**
@@ -2642,10 +2638,16 @@
 {
   g_return_if_fail (icon_info != NULL);
 
+  icon_info->ref_count--;
+  if (icon_info->ref_count > 0)
+    return;
+ 
   g_free (icon_info->filename);
 #ifdef G_OS_WIN32
   g_free (icon_info->cp_filename);
 #endif
+  if (icon_info->loadable)
+    g_object_unref (icon_info->loadable);
   if (icon_info->pixbuf)
     g_object_unref (icon_info->pixbuf);
   if (icon_info->cache_pixbuf)
@@ -2732,55 +2734,17 @@
   return icon_info->cache_pixbuf;
 }
 
-static GdkPixbuf *
-load_svg_at_size (const gchar *filename,
-		  gint         size,
-		  GError      **error)
-{
-  GdkPixbuf *pixbuf = NULL;
-  GdkPixbufLoader *loader = NULL;
-  gchar *contents = NULL;
-  gsize length;
-  
-  if (!g_file_get_contents (filename,
-			    &contents, &length, error))
-    goto bail;
-  
-  loader = gdk_pixbuf_loader_new_with_type ("svg", error);
-  if (loader == NULL)
-    goto bail;
-
-  gdk_pixbuf_loader_set_size (loader, size, size);
-  
-  if (!gdk_pixbuf_loader_write (loader, contents, length, error))
-    {
-      gdk_pixbuf_loader_close (loader, NULL);
-      goto bail;
-    }
-  
-  if (!gdk_pixbuf_loader_close (loader, error))
-    goto bail;
-  
-  pixbuf = g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader));
-  
- bail:
-  if (loader)
-    g_object_unref (loader);
-  g_free (contents);
-  
-  return pixbuf;
-}
-
-/* This function contains the complicatd logic for deciding
+/* This function contains the complicated logic for deciding
  * on the size at which to load the icon and loading it at
  * that size.
  */
 static gboolean
-icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info,
-				   gboolean     scale_only)
+icon_info_ensure_scale_and_pixbuf (GtkIconInfo  *icon_info,
+				   gboolean      scale_only)
 {
   int image_width, image_height;
   GdkPixbuf *source_pixbuf;
+  gboolean is_svg;
 
   /* First check if we already succeeded have the necessary
    * information (or failed earlier)
@@ -2797,16 +2761,61 @@
   /* SVG icons are a special case - we just immediately scale them
    * to the desired size
    */
-  if (icon_info->filename && g_str_has_suffix (icon_info->filename, ".svg"))
+  if (icon_info->filename && !icon_info->loadable) 
     {
+      GFile *file;
+
+      file = g_file_new_for_path (icon_info->filename);
+      icon_info->loadable = G_LOADABLE_ICON (g_file_icon_new (file));
+      g_object_unref (file);
+    }
+
+  is_svg = FALSE;
+  if (G_IS_FILE_ICON (icon_info->loadable))
+    {
+      GFile *file;
+      GFileInfo *file_info;
+      const gchar *content_type;
+
+      file = g_file_icon_get_file (G_FILE_ICON (icon_info->loadable));
+      file_info = g_file_query_info (file, 
+                                     G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+                                     G_FILE_QUERY_INFO_NONE,
+                                     NULL, NULL);
+      if (file_info) 
+        {
+          content_type = g_file_info_get_content_type (file_info);
+
+          if (content_type && strcmp (content_type, "image/svg+xml") == 0)
+            is_svg = TRUE;
+
+          g_object_unref (file_info);
+       }
+    }
+
+  if (is_svg)
+    {
+      GInputStream *stream;
+
       icon_info->scale = icon_info->desired_size / 1000.;
 
       if (scale_only)
 	return TRUE;
       
-      icon_info->pixbuf = load_svg_at_size (icon_info->filename,
-					    icon_info->desired_size,
-					    &icon_info->load_error);
+      stream = g_loadable_icon_load (icon_info->loadable,
+                                     icon_info->desired_size,
+                                     NULL, NULL,
+                                     &icon_info->load_error);
+      if (stream)
+        {
+          icon_info->pixbuf = gdk_pixbuf_new_from_stream_at_scale (stream,
+                                                                   icon_info->desired_size,
+                                                                   icon_info->desired_size,
+                                                                   TRUE,
+                                                                   NULL,
+                                                                   &icon_info->load_error);
+          g_object_unref (stream);
+        }
 
       return icon_info->pixbuf != NULL;
     }
@@ -2816,7 +2825,9 @@
    * for the directory where the icon is; the image size doesn't
    * matter in that case.
    */
-  if (icon_info->dir_type == ICON_THEME_DIR_FIXED)
+  if (icon_info->forced_size)
+    icon_info->scale = -1;
+  else if (icon_info->dir_type == ICON_THEME_DIR_FIXED)
     icon_info->scale = 1.0;
   else if (icon_info->dir_type == ICON_THEME_DIR_THRESHOLD)
     {
@@ -2838,17 +2849,29 @@
   /* At this point, we need to actually get the icon; either from the
    * builtin image or by loading the file
    */
+  source_pixbuf = NULL;
   if (icon_info->cache_pixbuf)
     source_pixbuf = g_object_ref (icon_info->cache_pixbuf);
   else
     {
+      GInputStream *stream;
 
-      source_pixbuf = gdk_pixbuf_new_from_file (icon_info->filename,
-						&icon_info->load_error);
-      if (!source_pixbuf)
-	return FALSE;
+      stream = g_loadable_icon_load (icon_info->loadable,
+                                     icon_info->desired_size,
+                                     NULL, NULL,
+                                     &icon_info->load_error);
+      if (stream)
+        {
+          source_pixbuf = gdk_pixbuf_new_from_stream (stream,
+                                                      NULL,
+                                                      &icon_info->load_error);
+          g_object_unref (stream);
+        }
     }
 
+  if (!source_pixbuf)
+    return FALSE;
+
   /* Do scale calculations that depend on the image size
    */
   image_width = gdk_pixbuf_get_width (source_pixbuf);
@@ -2858,11 +2881,12 @@
     {
       gint image_size = MAX (image_width, image_height);
       if (image_size > 0)
-	icon_info->scale = icon_info->desired_size / (gdouble)image_size;
+	icon_info->scale = (gdouble)icon_info->desired_size / (gdouble)image_size;
       else
 	icon_info->scale = 1.0;
       
-      if (icon_info->dir_type == ICON_THEME_DIR_UNTHEMED)
+      if (icon_info->dir_type == ICON_THEME_DIR_UNTHEMED && 
+          !icon_info->forced_size)
 	icon_info->scale = MIN (icon_info->scale, 1.0);
     }
 
@@ -2873,7 +2897,6 @@
    * extra complexity, we could keep the source pixbuf around
    * but not actually scale it until needed.
    */
-    
   if (icon_info->scale == 1.0)
     icon_info->pixbuf = source_pixbuf;
   else
@@ -2900,7 +2923,10 @@
  * that differ slightly from their nominal sizes, and in addition GTK+
  * will avoid scaling icons that it considers sufficiently close to the
  * requested size or for which the source image would have to be scaled
- * up too far. (This maintains sharpness.) 
+ * up too far. (This maintains sharpness.). This behaviour can be changed
+ * by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
+ * the #GtkIconInfo. If this flag has been specified, the pixbuf
+ * returned by this function will be scaled to the exact size. 
  * 
  * Return value: the rendered icon; this may be a newly created icon
  *  or a new reference to an internal icon, so you must not modify
@@ -3278,6 +3304,89 @@
     }
 }
 
+/**
+ * gtk_icon_theme_lookup_by_gicon:
+ * @icon_theme: a #GtkIconTheme
+ * @icon: the #GIcon to look up
+ * @size: desired icon size
+ * @flags: flags modifying the behavior of the icon lookup
+ * 
+ * Looks up an icon and returns a structure containing
+ * information such as the filename of the icon. 
+ * The icon can then be rendered into a pixbuf using
+ * gtk_icon_info_load_icon() or gtk_icon_info_load_at_size().
+ *
+ * Return value: a #GtkIconInfo structure containing 
+ *     information about the icon, or %NULL if the icon 
+ *     wasn't found. Free with gtk_icon_info_free()
+ *
+ * Since: 2.16
+ */
+GtkIconInfo *
+gtk_icon_theme_lookup_by_gicon (GtkIconTheme       *icon_theme,
+                                GIcon              *icon,
+                                gint                size,
+                                GtkIconLookupFlags  flags)
+{
+  GtkIconInfo *info;
+
+  g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL);
+  g_return_val_if_fail (G_IS_ICON (icon), NULL);
+
+  if (G_IS_LOADABLE_ICON (icon))
+    {
+      info = icon_info_new ();
+      info->loadable = G_LOADABLE_ICON (g_object_ref (icon));
+
+      info->dir_type = ICON_THEME_DIR_UNTHEMED;
+      info->dir_size = size;
+      info->desired_size = size;
+      info->threshold = 2;
+      info->forced_size = (flags & GTK_ICON_LOOKUP_FORCE_SIZE) != 0;
+
+      return info;
+    }
+  else if (G_IS_THEMED_ICON (icon))
+    {
+      const gchar **names;
+
+      names = (const gchar **)g_themed_icon_get_names (G_THEMED_ICON (icon));
+      info = gtk_icon_theme_choose_icon (icon_theme, names, size, flags);
+
+      return info;
+    }
+
+  return NULL;
+}
+
+/**
+ * gtk_icon_info_new_for_pixbuf:
+ * @icon_theme: a #GtkIconTheme
+ * @pixbuf: the pixbuf to wrap in a #GtkIconInfo
+ *
+ * Creates a #GtkIconInfo for a #GtkPixbuf. 
+ *
+ * Returns: a #GtkIconInfo
+ *
+ * Since: 2.16
+ */
+GtkIconInfo *
+gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme,
+                              GdkPixbuf    *pixbuf)
+{
+  GtkIconInfo *info;
+
+  g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL);
+  g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
+
+  info = icon_info_new ();
+  info->pixbuf = g_object_ref (pixbuf);
+  info->scale = 1.0;
+  info->dir_type = ICON_THEME_DIR_UNTHEMED;
+
+  return info;
+}
+
 #ifdef G_OS_WIN32
 
 /* DLL ABI stability backward compatibility versions */
Index: gtk/gtkicontheme.h
===================================================================
--- gtk/gtkicontheme.h	(revision 19748)
+++ gtk/gtkicontheme.h	(working copy)
@@ -69,15 +69,18 @@
  * @GTK_ICON_LOOKUP_GENERIC_FALLBACK: Try to shorten icon name at '-'
  *   characters before looking at inherited themes. For more general
  *   fallback, see gtk_icon_theme_choose_icon(). Since 2.12.
+ * @GTK_ICON_LOOKUP_FORCE_SIZE: Always return the icon scaled to the
+ *   requested size. Since 2.16.
  * 
  * Used to specify options for gtk_icon_theme_lookup_icon()
  **/
 typedef enum
 {
-  GTK_ICON_LOOKUP_NO_SVG = 1 << 0,
-  GTK_ICON_LOOKUP_FORCE_SVG = 1 << 1,
-  GTK_ICON_LOOKUP_USE_BUILTIN = 1 << 2,
-  GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3
+  GTK_ICON_LOOKUP_NO_SVG           = 1 << 0,
+  GTK_ICON_LOOKUP_FORCE_SVG        = 1 << 1,
+  GTK_ICON_LOOKUP_USE_BUILTIN      = 1 << 2,
+  GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3,
+  GTK_ICON_LOOKUP_FORCE_SIZE       = 1 << 4
 } GtkIconLookupFlags;
 
 #define GTK_ICON_THEME_ERROR gtk_icon_theme_error_quark ()
@@ -145,6 +148,11 @@
 						    GtkIconLookupFlags           flags,
 						    GError                     **error);
 
+GtkIconInfo * gtk_icon_theme_lookup_by_gicon       (GtkIconTheme                *icon_theme,
+                                                    GIcon                       *icon,
+                                                    gint                         size,
+                                                    GtkIconLookupFlags           flags);
+
 GList *       gtk_icon_theme_list_icons            (GtkIconTheme                *icon_theme,
 						    const gchar                 *context);
 GList *       gtk_icon_theme_list_contexts         (GtkIconTheme                *icon_theme);
@@ -152,29 +160,31 @@
 
 gboolean      gtk_icon_theme_rescan_if_needed      (GtkIconTheme                *icon_theme);
 
-void       gtk_icon_theme_add_builtin_icon  (const gchar *icon_name,
-					     gint         size,
-					     GdkPixbuf   *pixbuf);
+void          gtk_icon_theme_add_builtin_icon      (const gchar *icon_name,
+					            gint         size,
+					            GdkPixbuf   *pixbuf);
 
-GType         gtk_icon_info_get_type (void) G_GNUC_CONST;
-GtkIconInfo  *gtk_icon_info_copy     (GtkIconInfo *icon_info);
-void          gtk_icon_info_free     (GtkIconInfo *icon_info);
+GType                 gtk_icon_info_get_type           (void) G_GNUC_CONST;
+GtkIconInfo *         gtk_icon_info_copy               (GtkIconInfo  *icon_info);
+void                  gtk_icon_info_free               (GtkIconInfo  *icon_info);
 
-gint                  gtk_icon_info_get_base_size      (GtkIconInfo *icon_info);
-G_CONST_RETURN gchar *gtk_icon_info_get_filename       (GtkIconInfo *icon_info);
-GdkPixbuf    *        gtk_icon_info_get_builtin_pixbuf (GtkIconInfo *icon_info);
-GdkPixbuf    *        gtk_icon_info_load_icon          (GtkIconInfo *icon_info,
-							GError     **error);
+GtkIconInfo *         gtk_icon_info_new_for_pixbuf     (GtkIconTheme  *icon_theme,
+                                                        GdkPixbuf     *pixbuf);
 
-void                  gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info,
-							 gboolean     raw_coordinates);
+gint                  gtk_icon_info_get_base_size      (GtkIconInfo   *icon_info);
+G_CONST_RETURN gchar *gtk_icon_info_get_filename       (GtkIconInfo   *icon_info);
+GdkPixbuf *           gtk_icon_info_get_builtin_pixbuf (GtkIconInfo   *icon_info);
+GdkPixbuf *           gtk_icon_info_load_icon          (GtkIconInfo   *icon_info,
+							GError       **error);
+void                  gtk_icon_info_set_raw_coordinates (GtkIconInfo  *icon_info,
+							 gboolean      raw_coordinates);
 
-gboolean              gtk_icon_info_get_embedded_rect (GtkIconInfo   *icon_info,
-						       GdkRectangle  *rectangle);
-gboolean              gtk_icon_info_get_attach_points (GtkIconInfo   *icon_info,
-						       GdkPoint     **points,
-						       gint          *n_points);
-G_CONST_RETURN gchar *gtk_icon_info_get_display_name  (GtkIconInfo   *icon_info);
+gboolean              gtk_icon_info_get_embedded_rect (GtkIconInfo    *icon_info,
+						       GdkRectangle   *rectangle);
+gboolean              gtk_icon_info_get_attach_points (GtkIconInfo    *icon_info,
+						       GdkPoint      **points,
+						       gint           *n_points);
+G_CONST_RETURN gchar *gtk_icon_info_get_display_name  (GtkIconInfo    *icon_info);
 
 /* Non-public methods */
 void _gtk_icon_theme_check_reload                     (GdkDisplay *display);
Index: gtk/gtkimage.c
===================================================================
--- gtk/gtkimage.c	(revision 19748)
+++ gtk/gtkimage.c	(working copy)
@@ -94,7 +94,8 @@
   PROP_PIXEL_SIZE,
   PROP_PIXBUF_ANIMATION,
   PROP_ICON_NAME,
-  PROP_STORAGE_TYPE
+  PROP_STORAGE_TYPE,
+  PROP_GICON
 };
 
 G_DEFINE_TYPE (GtkImage, gtk_image, GTK_TYPE_MISC)
@@ -231,7 +232,24 @@
                                                         NULL,
                                                         GTK_PARAM_READWRITE));
   
+  /**
+   * GtkImage:gicon:
+   *
+   * The GIcon displayed in the GtkImage. For themed icons,
+   * If the icon theme is changed, the image will be updated
+   * automatically.
+   *
+   * Since: 2.14
+   */
   g_object_class_install_property (gobject_class,
+                                   PROP_GICON,
+                                   g_param_spec_object ("gicon",
+                                                        P_("Icon"),
+                                                        P_("The GIcon being displayed"),
+                                                        G_TYPE_ICON,
+                                                        GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (gobject_class,
                                    PROP_STORAGE_TYPE,
                                    g_param_spec_enum ("storage-type",
                                                       P_("Storage type"),
@@ -357,6 +375,10 @@
       gtk_image_set_from_icon_name (image, g_value_get_string (value),
 				    image->icon_size);
       break;
+    case PROP_GICON:
+      gtk_image_set_from_gicon (image, g_value_get_object (value),
+				image->icon_size);
+      break;
 
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -445,6 +467,13 @@
 	g_value_set_string (value,
 			    image->data.name.icon_name);
       break;
+    case PROP_GICON:
+      if (image->storage_type != GTK_IMAGE_GICON)
+	g_value_set_object (value, NULL);
+      else
+	g_value_set_object (value,
+			    image->data.gicon.icon);
+      break;
     case PROP_STORAGE_TYPE:
       g_value_set_enum (value, image->storage_type);
       break;
@@ -687,6 +716,33 @@
 }
 
 /**
+ * gtk_image_new_from_gicon:
+ * @icon: an icon
+ * @size: a stock icon size
+ * 
+ * Creates a #GtkImage displaying an icon from the current icon theme.
+ * If the icon name isn't known, a "broken image" icon will be
+ * displayed instead.  If the current icon theme is changed, the icon
+ * will be updated appropriately.
+ * 
+ * Return value: a new #GtkImage displaying the themed icon
+ *
+ * Since: 2.14
+ **/
+GtkWidget*
+gtk_image_new_from_gicon (GIcon *icon,
+			  GtkIconSize     size)
+{
+  GtkImage *image;
+
+  image = g_object_new (GTK_TYPE_IMAGE, NULL);
+
+  gtk_image_set_from_gicon (image, icon, size);
+
+  return GTK_WIDGET (image);
+}
+
+/**
  * gtk_image_set_from_pixmap:
  * @image: a #GtkImage
  * @pixmap: a #GdkPixmap or %NULL
@@ -1052,6 +1108,50 @@
 }
 
 /**
+ * gtk_image_set_from_gicon:
+ * @image: a #GtkImage
+ * @icon: an icon
+ * @size: an icon size
+ *
+ * See gtk_image_new_from_gicon() for details.
+ * 
+ * Since: 2.14
+ **/
+void
+gtk_image_set_from_gicon  (GtkImage       *image,
+			   GIcon          *icon,
+			   GtkIconSize     size)
+{
+  g_return_if_fail (GTK_IS_IMAGE (image));
+
+  g_object_freeze_notify (G_OBJECT (image));
+
+  /* in case icon == image->data.gicon.icon */
+  if (icon)
+    g_object_ref (icon);
+  
+  gtk_image_clear (image);
+
+  if (icon)
+    {
+      image->storage_type = GTK_IMAGE_GICON;
+      
+      image->data.gicon.icon = icon;
+      image->icon_size = size;
+
+      /* Size is demand-computed in size request method
+       * if we're a icon theme image, since changing the
+       * style impacts the size request
+       */
+    }
+
+  g_object_notify (G_OBJECT (image), "gicon");
+  g_object_notify (G_OBJECT (image), "icon-size");
+  
+  g_object_thaw_notify (G_OBJECT (image));
+}
+
+/**
  * gtk_image_get_storage_type:
  * @image: a #GtkImage
  * 
@@ -1376,6 +1476,14 @@
 
       gtk_widget_queue_draw (GTK_WIDGET (image));
     }
+  if (image->storage_type == GTK_IMAGE_GICON) 
+    {
+      if (image->data.gicon.pixbuf)
+	g_object_unref (image->data.gicon.pixbuf);
+      image->data.gicon.pixbuf = NULL;
+
+      gtk_widget_queue_draw (GTK_WIDGET (image));
+    }
 }
 
 static void
@@ -1459,6 +1567,60 @@
     }
 }
 
+static void
+ensure_pixbuf_for_gicon (GtkImage *image)
+{
+  GtkImagePrivate *priv;
+  GdkScreen *screen;
+  GtkIconTheme *icon_theme;
+  GtkSettings *settings;
+  gint width, height;
+  gint *sizes, *s, dist;
+  GError *error = NULL;
+  GtkIconInfo *info;
+
+  g_return_if_fail (image->storage_type == GTK_IMAGE_GICON);
+
+  priv = GTK_IMAGE_GET_PRIVATE (image);
+  screen = gtk_widget_get_screen (GTK_WIDGET (image));
+  icon_theme = gtk_icon_theme_get_for_screen (screen);
+  settings = gtk_settings_get_for_screen (screen);
+  if (image->data.gicon.pixbuf == NULL)
+    {
+      if (priv->pixel_size != -1)
+	{
+	  width = height = priv->pixel_size;
+	}
+      else if (!gtk_icon_size_lookup_for_settings (settings,
+						   image->icon_size,
+						   &width, &height))
+	{
+	  if (image->icon_size == -1)
+	    width = height = 48;
+	  else
+	    {
+	      g_warning ("Invalid icon size %d\n", image->icon_size);
+	      width = height = 24;
+	    }
+	}
+
+      info = gtk_icon_theme_lookup_by_gicon (icon_theme,
+					     image->data.gicon.icon,
+					     MIN (width, height), 0);
+      image->data.gicon.pixbuf = gtk_icon_info_load_icon (info, &error);
+      if (image->data.gicon.pixbuf == NULL)
+	{
+	  g_error_free (error);
+	  image->data.gicon.pixbuf =
+	    gtk_widget_render_icon (GTK_WIDGET (image),
+				    GTK_STOCK_MISSING_IMAGE,
+				    image->icon_size,
+				    NULL);
+	}
+    }
+}
+
+
 /*
  * Like gdk_rectangle_intersect (dest, src, dest), but make 
  * sure that the origin of dest is moved by an "even" offset. 
@@ -1690,6 +1852,17 @@
 	    }
 	  break;
 
+	case GTK_IMAGE_GICON:
+	  ensure_pixbuf_for_gicon (image);
+	  pixbuf = image->data.gicon.pixbuf;
+	  if (pixbuf)
+	    {
+	      g_object_ref (pixbuf);
+	      image_bound.width = gdk_pixbuf_get_width (pixbuf);
+	      image_bound.height = gdk_pixbuf_get_height (pixbuf);
+	    }
+	  break;
+	  
         case GTK_IMAGE_EMPTY:
           g_assert_not_reached ();
           break;
@@ -1893,6 +2066,18 @@
 
       break;
       
+    case GTK_IMAGE_GICON:
+      if (image->data.gicon.icon)
+	g_object_unref (image->data.gicon.icon);
+      image->data.gicon.icon = NULL;
+      if (image->data.gicon.pixbuf)
+	g_object_unref (image->data.gicon.pixbuf);
+      image->data.gicon.pixbuf = NULL;
+
+      g_object_notify (G_OBJECT (image), "gicon");
+
+      break;
+      
     case GTK_IMAGE_EMPTY:
     default:
       break;
@@ -1963,6 +2148,12 @@
       pixbuf = image->data.name.pixbuf;
       if (pixbuf) g_object_ref (pixbuf);
       break;
+    case GTK_IMAGE_GICON:
+      ensure_pixbuf_for_gicon (image);
+      pixbuf = image->data.gicon.pixbuf;
+      if (pixbuf)
+	g_object_ref (pixbuf);
+      break;
     default:
       break;
     }
@@ -2068,6 +2259,17 @@
 	  gtk_image_update_size (image, pixel_size, pixel_size);
 	}
       
+      if (image->storage_type == GTK_IMAGE_GICON)
+	{
+	  if (image->data.gicon.pixbuf)
+	    {
+	      g_object_unref (image->data.gicon.pixbuf);
+	      image->data.gicon.pixbuf = NULL;
+	    }
+	  
+	  gtk_image_update_size (image, pixel_size, pixel_size);
+	}
+      
       g_object_notify (G_OBJECT (image), "pixel-size");
     }
 }
Index: gtk/gtkimage.h
===================================================================
--- gtk/gtkimage.h	(revision 19748)
+++ gtk/gtkimage.h	(working copy)
@@ -29,6 +29,7 @@
 
 
 #include <gdk/gdk.h>
+#include <gio/gio.h>
 #include <gtk/gtkmisc.h>
 
 
@@ -52,6 +53,7 @@
 typedef struct _GtkImageIconSetData GtkImageIconSetData;
 typedef struct _GtkImageAnimationData GtkImageAnimationData;
 typedef struct _GtkImageIconNameData  GtkImageIconNameData;
+typedef struct _GtkImageGIconData     GtkImageGIconData;
 
 struct _GtkImagePixmapData
 {
@@ -92,6 +94,13 @@
   guint theme_change_id;
 };
 
+struct _GtkImageGIconData
+{
+  GIcon *icon;
+  GdkPixbuf *pixbuf;
+  guint theme_change_id;
+};
+
 typedef enum
 {
   GTK_IMAGE_EMPTY,
@@ -101,7 +110,8 @@
   GTK_IMAGE_STOCK,
   GTK_IMAGE_ICON_SET,
   GTK_IMAGE_ANIMATION,
-  GTK_IMAGE_ICON_NAME
+  GTK_IMAGE_ICON_NAME,
+  GTK_IMAGE_GICON
 } GtkImageType;
 
 struct _GtkImage
@@ -119,6 +129,7 @@
     GtkImageIconSetData icon_set;
     GtkImageAnimationData anim;
     GtkImageIconNameData name;
+    GtkImageGIconData gicon;
   } data;
 
   /* Only used with GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE */
@@ -161,6 +172,8 @@
 GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation);
 GtkWidget* gtk_image_new_from_icon_name (const gchar     *icon_name,
 					 GtkIconSize      size);
+GtkWidget* gtk_image_new_from_gicon     (GIcon           *icon,
+					 GtkIconSize      size);
 
 void gtk_image_clear              (GtkImage        *image);
 void gtk_image_set_from_pixmap    (GtkImage        *image,
@@ -184,6 +197,9 @@
 void gtk_image_set_from_icon_name (GtkImage        *image,
 				   const gchar     *icon_name,
 				   GtkIconSize      size);
+void gtk_image_set_from_gicon     (GtkImage        *image,
+				   GIcon           *icon,
+				   GtkIconSize      size);
 void gtk_image_set_pixel_size     (GtkImage        *image,
 				   gint             pixel_size);
 
Index: tests/testimage.c
===================================================================
--- tests/testimage.c	(revision 19748)
+++ tests/testimage.c	(working copy)
@@ -18,6 +18,7 @@
  */
 
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 
 static void
 drag_begin (GtkWidget      *widget,
@@ -103,6 +104,8 @@
   GtkIconSource *iconsource;
   gchar *icon_name = "gnome-terminal";
   gchar *anim_filename = NULL;
+  GIcon *icon;
+  GFile *file;
 
   gtk_init (&argc, &argv);
 
@@ -173,6 +176,20 @@
   gtk_image_set_pixel_size (GTK_IMAGE (image), 30);
   gtk_table_attach_defaults (GTK_TABLE (table), image, 2, 3, 4, 5);
 
+  label = gtk_label_new ("GTK_IMAGE_GICON");
+  gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 5, 6);
+  icon = g_themed_icon_new_with_default_fallbacks ("folder-remote");
+  image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
+  g_object_unref (icon);
+  gtk_table_attach_defaults (GTK_TABLE (table), image, 1, 2, 5, 6);
+  file = g_file_new_for_path ("apple-red.png");
+  icon = g_file_icon_new (file);
+  image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
+  g_object_unref (icon);
+  gtk_image_set_pixel_size (GTK_IMAGE (image), 30);
+  gtk_table_attach_defaults (GTK_TABLE (table), image, 2, 3, 5, 6);
+
+  
   if (anim_filename)
     {
       label = gtk_label_new ("GTK_IMAGE_ANIMATION (from file)");
