]> granicus.if.org Git - graphviz/commitdiff
GTK plugin: remove unused 'create_pixmap'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 19:30:21 +0000 (12:30 -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 449cd05f87027f313f8e3e92d3463422f15cfad4..b4e2f12867dc207e487a76cac19db14e02d5bfd9 100644 (file)
@@ -49,47 +49,3 @@ add_pixmap_directory                   (const gchar     *directory)
   pixmaps_directories = g_list_prepend (pixmaps_directories,
                                         g_strdup (directory));
 }
-
-/* This is an internally used function to find pixmap files. */
-static gchar*
-find_pixmap_file                       (const gchar     *filename)
-{
-  GList *elem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  elem = pixmaps_directories;
-  while (elem)
-    {
-      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
-                                         G_DIR_SEPARATOR_S, filename);
-      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
-        return pathname;
-      g_free (pathname);
-      elem = elem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget*
-create_pixmap                          (GtkWidget       *widget,
-                                        const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GtkWidget *pixmap;
-
-  if (!filename || !filename[0])
-      return gtk_image_new ();
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return gtk_image_new ();
-    }
-
-  pixmap = gtk_image_new_from_file (pathname);
-  g_free (pathname);
-  return pixmap;
-}
index 156b989c8952377556a908b00382c2ad8058d8e1..2029476d908b5fe56dfa0094b67fa95b76a37a8a 100644 (file)
@@ -47,12 +47,3 @@ GtkWidget*  lookup_widget              (GtkWidget       *widget,
 
 /* Use this function to set the directory containing installed pixmaps. */
 void        add_pixmap_directory       (const gchar     *directory);
-
-
-/*
- * Private Functions.
- */
-
-/* This is used to create the pixmaps used in the interface. */
-GtkWidget*  create_pixmap              (GtkWidget       *widget,
-                                        const gchar     *filename);