[gtk/image-loading] pixbufutils: Simplify function



commit 9b5fce2490db7cb6e61e6211be8ba9f93b3b2620
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 14 18:17:44 2021 +0200

    pixbufutils: Simplify function

 gtk/gdkpixbufutils.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/gtk/gdkpixbufutils.c b/gtk/gdkpixbufutils.c
index ecd68ceb0e..7bbe5d5fd8 100644
--- a/gtk/gdkpixbufutils.c
+++ b/gtk/gdkpixbufutils.c
@@ -507,14 +507,7 @@ gtk_make_symbolic_pixbuf_from_file (GFile       *file,
 GdkTexture *
 gtk_load_symbolic_texture_from_resource (const char *path)
 {
-  GdkPixbuf *pixbuf;
-  GdkTexture *texture;
-
-  pixbuf = _gdk_pixbuf_new_from_resource (path, "png", NULL);
-  texture = gdk_texture_new_for_pixbuf (pixbuf);
-  g_object_unref (pixbuf);
-
-  return texture;
+  return gdk_texture_new_from_resource (path);
 }
 
 GdkTexture *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]