Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend/ev-document.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-04-03 00:30:59 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-04-03 00:30:59 (GMT)
commitf91763ca68146b026095915fc0ee380ac23ab9ab (patch)
tree636d8ebd106709f96a3ef7e54e8a919ddce4b256 /backend/ev-document.c
parenta4a3a2301361cb6a71e1b127e8e43589f2749105 (diff)
Add support for PDF attachments. Fixes bug #325143
* backend/Makefile.am: * data/evince-ui.xml: * backend/ev-attachment.[ch]: * backend/ev-document.[ch]: (ev_document_has_attachments), (ev_document_get_attachments): * pdf/ev-poppler.cc: (pdf_document_has_attachments), (attachment_save_to_buffer), (pdf_document_get_attachments), (pdf_document_document_iface_init): * shell/Makefile.am: * shell/ev-attachment-bar.[ch]: * shell/ev-window.c: Add support for PDF attachments. Fixes bug #325143
Diffstat (limited to 'backend/ev-document.c')
-rw-r--r--backend/ev-document.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/backend/ev-document.c b/backend/ev-document.c
index a800866..10f1d00 100644
--- a/backend/ev-document.c
+++ b/backend/ev-document.c
@@ -200,7 +200,30 @@ ev_document_get_links (EvDocument *document,
return retval;
}
+gboolean
+ev_document_has_attachments (EvDocument *document)
+{
+ EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
+
+ if (iface->has_attachments == NULL)
+ return FALSE;
+
+ return iface->has_attachments (document);
+}
+
+GList *
+ev_document_get_attachments (EvDocument *document)
+{
+ EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
+ GList *retval;
+ LOG ("ev_document_get_attachments");
+ if (iface->get_attachments == NULL)
+ return NULL;
+ retval = iface->get_attachments (document);
+
+ return retval;
+}
GdkPixbuf *
ev_document_render_pixbuf (EvDocument *document,