Commit 195fe472 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

GladePropertyClass: fix missing images data loss

Make make_object_from_string() always return a different pixbuf for
image properties to avoid loosing data by returning a copy
of gtk_icon_theme_load_icon()

Dix bug #772485 "File Name property of GtkImage is copied to all other GtkImage"
parent c1496e8d
......@@ -712,8 +712,11 @@ glade_property_class_make_object_from_string (GladePropertyClass *
if ((pixbuf = gdk_pixbuf_new_from_file (fullpath, NULL)) == NULL)
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"image-missing", 22, 0, NULL);
GdkPixbuf *icon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"image-missing", 22, 0, NULL);
/* Use a copy, since gtk_icon_theme_load_icon() returns the same pixbuf */
pixbuf = gdk_pixbuf_copy (icon);
g_object_unref (icon);
if (pixbuf)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment