Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/Makefile.am6
-rw-r--r--backend/ev-document-factory.c17
-rw-r--r--backend/ev-document-factory.h3
3 files changed, 25 insertions, 1 deletions
diff --git a/backend/Makefile.am b/backend/Makefile.am
index db21e4c..f92c607 100644
--- a/backend/Makefile.am
+++ b/backend/Makefile.am
@@ -7,6 +7,7 @@ INCLUDES= \
-I$(top_srcdir)/ps \
-I$(top_srcdir)/djvu \
-I$(top_srcdir)/dvi \
+ -I$(top_srcdir)/impress \
-I$(top_srcdir)/comics \
$(BACKEND_CFLAGS) \
$(WARN_CFLAGS) \
@@ -83,6 +84,11 @@ libevbackend_la_LIBADD += \
$(top_builddir)/comics/libcomicsdocument.la
endif
+if ENABLE_IMPRESS
+libevbackend_la_LIBADD += \
+ $(top_builddir)/impress/libimpressdocument.la
+endif
+
BUILT_SOURCES= \
ev-backend-marshalers.h \
ev-backend-marshalers.c
diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c
index e3f384f..23364a2 100644
--- a/backend/ev-document-factory.c
+++ b/backend/ev-document-factory.c
@@ -28,6 +28,8 @@
#include "ev-poppler.h"
#include "pixbuf-document.h"
#include "tiff-document.h"
+#include "impress-document.h"
+
#ifdef ENABLE_PS
#include "ps-document.h"
#endif
@@ -67,6 +69,11 @@ const EvDocumentType document_types[] = {
{"image/x-eps", EV_BACKEND_PS, ps_document_get_type},
#endif
+#ifdef ENABLE_IMPRESS
+ /* Impress slides: */
+ {"application/vnd.sun.xml.impress", EV_BACKEND_IMPRESS, impress_document_get_type},
+#endif
+
#ifdef ENABLE_TIFF
/* Tiff: */
{"image/tiff", EV_BACKEND_TIFF, tiff_document_get_type},
@@ -395,6 +402,16 @@ ev_document_factory_add_filters (GtkWidget *chooser, EvDocument *document)
}
#endif
+#ifdef ENABLE_IMPRESS
+ if (document == NULL || backend == EV_BACKEND_IMPRESS) {
+ default_filter = filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, _("Impress Slides"));
+ mime_types = ev_document_factory_get_mime_types (EV_BACKEND_IMPRESS);
+ file_filter_add_mime_list_and_free (filter, mime_types);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
+ }
+#endif
+
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
diff --git a/backend/ev-document-factory.h b/backend/ev-document-factory.h
index 215f50b..886be69 100644
--- a/backend/ev-document-factory.h
+++ b/backend/ev-document-factory.h
@@ -33,7 +33,8 @@ typedef enum {
EV_BACKEND_PIXBUF,
EV_BACKEND_DJVU,
EV_BACKEND_DVI,
- EV_BACKEND_COMICS
+ EV_BACKEND_COMICS,
+ EV_BACKEND_IMPRESS
} EvBackend;
EvDocument* ev_document_factory_get_document (const char *uri, GError **error);