diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index eda155563c..a548f00582 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -530,6 +530,7 @@ gtk_builder_get_parameters (GtkBuilder *builder, if (G_IS_PARAM_SPEC_OBJECT (prop->pspec) && (G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != GDK_TYPE_PIXBUF) && + (G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != GDK_TYPE_TEXTURE) && (G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != G_TYPE_FILE)) { GObject *object = g_hash_table_lookup (builder->priv->objects, @@ -2084,7 +2085,8 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, break; case G_TYPE_OBJECT: case G_TYPE_INTERFACE: - if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF)) + if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF) || + G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE)) { gchar *filename; GError *tmp_error = NULL; @@ -2136,7 +2138,16 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, if (pixbuf) { - g_value_set_object (value, pixbuf); + if (G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE)) + { + GdkTexture *texture = gdk_texture_new_for_pixbuf (pixbuf); + g_value_set_object (value, texture); + g_object_unref (texture); + } + else + { + g_value_set_object (value, pixbuf); + } g_object_unref (G_OBJECT (pixbuf)); }