+static GdkPixbuf *
+load_pixbuf (const char *file)
+{
+ GdkPixbuf *pb;
+#ifdef HAVE_GTK2
+ GError *err = NULL;
+
+ pb = gdk_pixbuf_new_from_file (file, &err);
+#else /* !HAVE_GTK2 */
+ pb = gdk_pixbuf_new_from_file (file);
+#endif /* HAVE_GTK2 */
+
+ if (!pb)
+ {
+#ifdef HAVE_GTK2
+ fprintf (stderr, "%s: %s\n", progname, err->message);
+ g_error_free (err);
+#else /* !HAVE_GTK2 */
+ fprintf (stderr, "%s: unable to load %s\n", progname, file);
+#endif /* !HAVE_GTK2 */
+ exit (1);
+ }
+
+ return pb;
+}