From: cedlemo Date: Wed, 24 Jun 2015 13:59:00 +0000 (+0000) Subject: GtkImage: Make resource property work properly X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~9278 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d31e1fbef092543caeef4db2a597ad6faabeb075;p=gtk4.git GtkImage: Make resource property work properly gtk_image_set_from_resource was setting the resource_path, only to have it overwritten again before returning. That is not as it should be, so change things to set the resource path late. https://bugzilla.gnome.org/show_bug.cgi?id=751443 --- diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 5763f06915..032100d29b 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -1015,8 +1015,6 @@ gtk_image_set_from_resource (GtkImage *image, return; } - priv->resource_path = g_strdup (resource_path); - if (gdk_pixbuf_animation_is_static_image (animation)) gtk_image_set_from_pixbuf (image, gdk_pixbuf_animation_get_static_image (animation)); else @@ -1024,6 +1022,8 @@ gtk_image_set_from_resource (GtkImage *image, _gtk_icon_helper_set_pixbuf_scale (priv->icon_helper, scale_factor); + priv->resource_path = g_strdup (resource_path); + g_object_notify (G_OBJECT (image), "resource"); g_object_unref (animation);