X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fev-document-factory.c;h=f9118b621cef39039394137cc2022c7aa8182fcd;hb=205c689a78e992d1ad3cf9223f7c95bf424dda94;hp=e73344a062ff2b2db560165612db366c9e0a4f6d;hpb=0848b6e8ad61c6074c73b0be2933a2c943e5fc51;p=evince.git diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c index e73344a0..f9118b62 100644 --- a/backend/ev-document-factory.c +++ b/backend/ev-document-factory.c @@ -35,6 +35,9 @@ #ifdef ENABLE_DJVU #include "djvu-document.h" #endif +#ifdef ENABLE_COMICS +#include "comics-document.h" +#endif #include @@ -69,8 +72,15 @@ const EvDocumentType document_types[] = { /* dvi: */ {"application/x-dvi", EV_BACKEND_DVI, dvi_document_get_type}, #endif + +#ifdef ENABLE_COMICS + /* cbr/cbz: */ + {"application/cbr", EV_BACKEND_COMICS, comics_document_get_type}, + {"application/cbz", EV_BACKEND_COMICS, comics_document_get_type}, +#endif }; +#ifdef ENABLE_PIXBUF /* Would be nice to have this in gdk-pixbuf */ static gboolean mime_type_supported_by_gdk_pixbuf (const gchar *mime_type) @@ -108,7 +118,7 @@ mime_type_supported_by_gdk_pixbuf (const gchar *mime_type) return retval; } - +#endif static GType ev_document_type_get_from_mime (const char *mime_type) @@ -123,10 +133,11 @@ ev_document_type_get_from_mime (const char *mime_type) 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; }