#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdio.h>
#include <gtk/gtk.h>
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;
-}
/* 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);