]> granicus.if.org Git - graphviz/commitdiff
GTK plugin: remove unused 'create_pixbuf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 19:28:42 +0000 (12:28 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 5 Apr 2022 01:41:06 +0000 (18:41 -0700)
plugin/gtk/support.c
plugin/gtk/support.h

index dc6b1fefbd73109406199f44c6fe05a6ab1f3bba..449cd05f87027f313f8e3e92d3463422f15cfad4 100644 (file)
@@ -9,7 +9,6 @@
 #ifdef HAVE_UNISTD_H 
 #include <unistd.h>
 #endif
-#include <stdio.h>
 
 #include <gtk/gtk.h>
 
@@ -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;
-}
index d96659baf22db920cb43c1791c7e16c8e572e81f..156b989c8952377556a908b00382c2ad8058d8e1 100644 (file)
@@ -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);