From: Matthew Fernandez Date: Sat, 2 Apr 2022 19:28:42 +0000 (-0700) Subject: GTK plugin: remove unused 'create_pixbuf' X-Git-Tag: 4.0.0~135^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a85045815388cec0abcdd9df4b9af698a6edaf0d;p=graphviz GTK plugin: remove unused 'create_pixbuf' --- diff --git a/plugin/gtk/support.c b/plugin/gtk/support.c index dc6b1fefb..449cd05f8 100644 --- a/plugin/gtk/support.c +++ b/plugin/gtk/support.c @@ -9,7 +9,6 @@ #ifdef HAVE_UNISTD_H #include #endif -#include #include @@ -94,33 +93,3 @@ create_pixmap (GtkWidget *widget, g_free (pathname); return pixmap; } - -/* This is an internally used function to create pixmaps. */ -GdkPixbuf* -create_pixbuf (const gchar *filename) -{ - gchar *pathname = NULL; - GdkPixbuf *pixbuf; - GError *error = NULL; - - if (!filename || !filename[0]) - return NULL; - - pathname = find_pixmap_file (filename); - - if (!pathname) - { - g_warning (_("Couldn't find pixmap file: %s"), filename); - return NULL; - } - - pixbuf = gdk_pixbuf_new_from_file (pathname, &error); - if (!pixbuf) - { - fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", - pathname, error->message); - g_error_free (error); - } - g_free (pathname); - return pixbuf; -} diff --git a/plugin/gtk/support.h b/plugin/gtk/support.h index d96659baf..156b989c8 100644 --- a/plugin/gtk/support.h +++ b/plugin/gtk/support.h @@ -56,6 +56,3 @@ void add_pixmap_directory (const gchar *directory); /* This is used to create the pixmaps used in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); - -/* This is used to create the pixbufs used in the interface. */ -GdkPixbuf* create_pixbuf (const gchar *filename);