summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-01-28 10:30:01 +0100
committerAlexander Larsson <alexl@redhat.com>2020-01-29 19:06:16 +0100
commitdbe021239f4555375350998591995676885fab08 (patch)
tree339149db297690c0c48e05f36d799a8b9175ec91 /gtk/gtkbuilder.c
parent884e06ad372d6147145d83327d6aa56d01e851f9 (diff)
downloadgtk+-dbe021239f4555375350998591995676885fab08.tar.gz
icons: Convert use of load() to download_texture()
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r--gtk/gtkbuilder.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index b98ab3566c..7e962e0b31 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -2157,7 +2157,8 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
if (pixbuf == NULL)
{
GtkIconTheme *theme;
- GdkPaintable *texture;
+ GtkIconInfo *icon;
+ GdkTexture *texture;
g_warning ("Could not load image '%s': %s",
string, tmp_error->message);
@@ -2165,12 +2166,12 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
/* fall back to a missing image */
theme = gtk_icon_theme_get_default ();
- texture = gtk_icon_theme_load_icon (theme,
- "image-missing",
- 16,
- GTK_ICON_LOOKUP_USE_BUILTIN,
- NULL);
- pixbuf = gdk_pixbuf_get_from_texture (GDK_TEXTURE (texture));
+
+ icon = gtk_icon_theme_lookup_icon (theme, "image-missing", 16,
+ GTK_ICON_LOOKUP_USE_BUILTIN);
+ texture = gtk_icon_info_download_texture (icon, NULL);
+ pixbuf = gdk_pixbuf_get_from_texture (texture);
+ g_object_unref (icon);
g_object_unref (texture);
}