-#ifdef ENABLE_PIXBUF
-static GList*
-gdk_pixbuf_mime_type_list ()
-{
- GSList *formats, *list;
- GList *result = NULL;
-
- formats = gdk_pixbuf_get_formats ();
- for (list = formats; list != NULL; list = list->next) {
- GdkPixbufFormat *format = list->data;
- gchar **mime_types;
-
- if (gdk_pixbuf_format_is_disabled (format))
- continue;
-
- mime_types = gdk_pixbuf_format_get_mime_types (format);
- result = g_list_prepend (result, mime_types);
- }
- g_slist_free (formats);
-
- return result;
-}
-
-/* Would be nice to have this in gdk-pixbuf */
-static gboolean
-mime_type_supported_by_gdk_pixbuf (const gchar *mime_type)
-{
- GList *mime_types;
- GList *list;
- gboolean retval = FALSE;
-
- mime_types = gdk_pixbuf_mime_type_list ();
- for (list = mime_types; list; list = list->next) {
- gchar **mtypes = (gchar **)list->data;
- const gchar *mtype;
- gint i = 0;
-
- while ((mtype = mtypes[i++])) {
- if (strcmp (mtype, mime_type) == 0) {
- retval = TRUE;
- break;
- }
- }
- }
-
- g_list_foreach (mime_types, (GFunc)g_strfreev, NULL);
- g_list_free (mime_types);
-
- return retval;
-}
-#endif /* ENABLE_PIXBUF */
-