diff --git a/gtk/gdktextureutils.c b/gtk/gdktextureutils.c index 158573650e..f9b82492a8 100644 --- a/gtk/gdktextureutils.c +++ b/gtk/gdktextureutils.c @@ -623,6 +623,26 @@ gdk_texture_new_from_resource_with_fg (const char *path, return texture; } +GdkTexture * +gdk_texture_new_from_stream_with_fg (GInputStream *stream, + gboolean *only_fg, + GCancellable *cancellable, + GError **error) +{ + GdkPixbuf *pixbuf; + GdkTexture *texture = NULL; + + pixbuf = _gdk_pixbuf_new_from_stream_scaled (stream, 0, cancellable, error); + if (pixbuf) + { + *only_fg = pixbuf_is_only_fg (pixbuf); + texture = gdk_texture_new_for_pixbuf (pixbuf); + g_object_unref (pixbuf); + } + + return texture; +} + GdkTexture * gdk_texture_new_from_stream_at_scale (GInputStream *stream, int width, @@ -646,26 +666,6 @@ gdk_texture_new_from_stream_at_scale (GInputStream *stream, return texture; } -GdkTexture * -gdk_texture_new_from_stream (GInputStream *stream, - gboolean *only_fg, - GCancellable *cancellable, - GError **error) -{ - GdkPixbuf *pixbuf; - GdkTexture *texture = NULL; - - pixbuf = _gdk_pixbuf_new_from_stream_scaled (stream, 0, cancellable, error); - if (pixbuf) - { - *only_fg = pixbuf_is_only_fg (pixbuf); - texture = gdk_texture_new_for_pixbuf (pixbuf); - g_object_unref (pixbuf); - } - - return texture; -} - GdkTexture * gdk_texture_new_from_resource_at_scale (const char *path, int width, diff --git a/gtk/gdktextureutilsprivate.h b/gtk/gdktextureutilsprivate.h index a71c357cf0..eabbc409d6 100644 --- a/gtk/gdktextureutilsprivate.h +++ b/gtk/gdktextureutilsprivate.h @@ -34,7 +34,7 @@ GdkTexture *gdk_texture_new_from_filename_with_fg (const char *filename, GError **error); GdkTexture *gdk_texture_new_from_resource_with_fg (const char *path, gboolean *only_fg); -GdkTexture *gdk_texture_new_from_stream (GInputStream *stream, +GdkTexture *gdk_texture_new_from_stream_with_fg (GInputStream *stream, gboolean *only_fg, GCancellable *cancellable, GError **error); diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 8a322915b1..4700010b65 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3811,7 +3811,7 @@ icon_ensure_texture__locked (GtkIconPaintable *icon, NULL, &load_error); else - icon->texture = gdk_texture_new_from_stream (stream, &only_fg, NULL, &load_error); + icon->texture = gdk_texture_new_from_stream_with_fg (stream, &only_fg, NULL, &load_error); g_object_unref (stream); }