- case GTK_IMAGE_PIXBUF:
- pixbuf = priv->data.pixbuf.pixbuf;
- g_object_ref (pixbuf);
- break;
-
- case GTK_IMAGE_STOCK:
- pixbuf = gtk_widget_render_icon (widget,
- priv->data.stock.stock_id,
- priv->icon_size,
- NULL);
-
- /* already done */
- needs_state_transform = FALSE;
- break;
-
- case GTK_IMAGE_ICON_SET:
- pixbuf =
- gtk_icon_set_render_icon (priv->data.icon_set.icon_set,
- gtk_widget_get_style (widget),
- gtk_widget_get_direction (widget),
- gtk_widget_get_state (widget),
- priv->icon_size,
- widget,
- NULL);
-
- /* already done */
- needs_state_transform = FALSE;
- break;
-
- case GTK_IMAGE_ANIMATION:
- {
- if (priv->data.anim.iter == NULL)
- {
- priv->data.anim.iter = gdk_pixbuf_animation_get_iter (priv->data.anim.anim, NULL);
-
- if (gdk_pixbuf_animation_iter_get_delay_time (priv->data.anim.iter) >= 0)
- priv->data.anim.frame_timeout =
- gdk_threads_add_timeout (gdk_pixbuf_animation_iter_get_delay_time (priv->data.anim.iter),
- animation_timeout,
- image);
- }
-
- /* don't advance the anim iter here, or we could get frame changes between two
- * exposes of different areas.
- */
-
- pixbuf = gdk_pixbuf_animation_iter_get_pixbuf (priv->data.anim.iter);
- g_object_ref (pixbuf);
- }
- break;
-
- case GTK_IMAGE_ICON_NAME:
- state = gtk_widget_get_state (widget);
- if (state == GTK_STATE_INSENSITIVE)
- {
- ensure_pixbuf_for_icon_name (image, GTK_STATE_NORMAL);
- }
- else
- {
- ensure_pixbuf_for_icon_name (image, state);
- /* Already done by the loading function? */
- if (priv->was_symbolic)
- needs_state_transform = FALSE;
- }
- pixbuf = priv->data.name.pixbuf;
- if (pixbuf)
- {
- g_object_ref (pixbuf);
- }
- break;
-
- case GTK_IMAGE_GICON:
- state = gtk_widget_get_state (widget);
- if (state == GTK_STATE_INSENSITIVE)
- {
- ensure_pixbuf_for_gicon (image, GTK_STATE_NORMAL);
- }
- else
- {
- ensure_pixbuf_for_gicon (image, state);
- /* Already done by the loading function? */
- if (priv->was_symbolic)
- needs_state_transform = FALSE;
- }
- pixbuf = priv->data.gicon.pixbuf;
- if (pixbuf)
- {
- g_object_ref (pixbuf);
- }
- break;
-
- case GTK_IMAGE_EMPTY:
- default:
- g_assert_not_reached ();
- pixbuf = NULL;
- break;
- }