summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-03-16 04:29:42 +0100
committerBenjamin Otte <otte@redhat.com>2018-03-16 06:04:45 +0100
commitcbe40f5f46d8358ec944b00037d73482d2d6b4a2 (patch)
treeeccce9d4a465291f86afafcd35d498f3a4ab4726 /gtk/gtkbuilder.c
parent2935ef81286e8b70e1e03cf1eeca4666834c8490 (diff)
downloadgtk+-cbe40f5f46d8358ec944b00037d73482d2d6b4a2.tar.gz
image: Remove gtk_image_set_texture()
gtk_image_get_paintable() is a perfect replacement, so use that one.
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r--gtk/gtkbuilder.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index c492da1e4e..98bde12161 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -529,6 +529,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) != GDK_TYPE_PAINTABLE) &&
(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != G_TYPE_FILE))
{
GObject *object = g_hash_table_lookup (builder->priv->objects,
@@ -2050,6 +2051,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
case G_TYPE_OBJECT:
case G_TYPE_INTERFACE:
if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF) ||
+ G_VALUE_HOLDS (value, GDK_TYPE_PAINTABLE) ||
G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE))
{
gchar *filename;
@@ -2102,7 +2104,8 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
if (pixbuf)
{
- if (G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE))
+ if (G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE) ||
+ G_VALUE_HOLDS (value, GDK_TYPE_PAINTABLE))
{
GdkTexture *texture = gdk_texture_new_for_pixbuf (pixbuf);
g_value_set_object (value, texture);