+2005-07-11 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * Makefile.am:
+ * backend/Makefile.am:
+ * backend/ev-document-factory.c: (ev_document_type_get_from_mime):
+ * configure.ac:
+ * shell/ev-document-types.c: (ev_document_types_add_filters):
+
+ Allow to enable/disable the pixbuf backend.
+ Default to off for now. If we want it enabled we should
+ really put mime types in the desktop, implement properties etc.
+
+ * properties/evince-properties.c:
+
+ Initialize error to NULL.
+ Check error is not NULL before freeing.
+
2005-07-11 Marco Pesenti Gritti <mpg@redhat.com>
* shell/ev-window.c:
# Backends
-SUBDIRS += pdf ps pixbuf
+SUBDIRS += pdf ps
+
+if ENABLE_PIXBUF
+SUBDIRS += pixbuf
+endif
if ENABLE_DJVU
- SUBDIRS += djvu
+SUBDIRS += djvu
endif
if ENABLE_TIFF
- SUBDIRS += tiff
+SUBDIRS += tiff
endif
if ENABLE_DVI
- SUBDIRS += dvi
+SUBDIRS += dvi
endif
SUBDIRS += backend
libevbackend_la_LIBADD = \
$(top_builddir)/pdf/libpdfdocument.la \
- $(top_builddir)/pixbuf/libpixbufdocument.la \
$(top_builddir)/ps/libpsdocument.la
+if ENABLE_PIXBUF
+libevbackend_la_LIBADD += \
+ $(top_builddir)/pixbuf/libpixbufdocument.la
+endif
+
if ENABLE_DJVU
libevbackend_la_LIBADD += \
$(top_builddir)/djvu/libgtkdjvu.la
return document_types[i].document_type_factory_callback();
}
}
-
+#ifdef ENABLE_PIXBUF
if (mime_type_supported_by_gdk_pixbuf (mime_type)) {
return pixbuf_document_get_type ();
}
+#endif
return G_TYPE_INVALID;
}
dnl ================== End of dvi checks ===================================================
+dnl ================== pixbuf checks ===================================================
+
+AC_ARG_ENABLE(pixbuf,
+ [AC_HELP_STRING([--enable-pixbuf], [Compile with support of pixbuf])],enable_pixbuf="$enableval",enable_pixbuf=no)
+if test "x$enable_pixbuf" = "xyes"; then
+ AC_DEFINE([ENABLE_PIXBUF], [1], [Enable pixbuf support.])
+fi
+AM_CONDITIONAL(ENABLE_PIXBUF, test x$enable_pixbuf = xyes)
+
+dnl ================== End of dvi checks ===================================================
+
dnl =================== Mime types list ====================================================
EVINCE_MIME_TYPES="application/pdf;application/postscript;application/x-gzpostscript"
ev_properties_get_pages (NautilusPropertyPageProvider *provider,
GList *files)
{
- GError *error;
+ GError *error = NULL;
char *mime;
EvDocument *document;
GList *pages = NULL;
uri = nautilus_file_info_get_uri (file);
if (!ev_document_load (document, uri, &error)) {
- g_error_free (error);
+ if (error) {
+ g_error_free (error);
+ }
goto end;
}
label = gtk_label_new (_("Document"));
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
}
+#ifdef ENABLE_PIXBUF
if (document == NULL || backend == EV_BACKEND_PIXBUF) {
default_filter = filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Images"));
gtk_file_filter_add_pixbuf_formats (filter);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
}
+#endif
#ifdef ENABLE_DVI
if (document == NULL || backend == EV_BACKEND_DVI) {