Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-06-04 09:39:48 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-06-04 09:39:48 (GMT)
commitdbbd21a4d621a47629ac03ffc71651172f574138 (patch)
tree318dec35ac26574f35990d2f6f2a793fd773be24 /pdf
parentbbd8576757758f6e6ffb633d61bab361337e7927 (diff)
Rework properties code to take only EvPropertyInfo in the constructor so
2005-06-04 Marco Pesenti Gritti <mpg@redhat.com> * backend/ev-document-info.h: * backend/ev-document.c: (ev_document_info_free): * data/evince-properties.glade: * pdf/ev-poppler.cc: * ps/ps-document.c: (ps_document_get_info): * shell/ev-properties.c: (ev_properties_format_date), (set_property), (ev_properties_new): * shell/ev-properties.h: * shell/ev-window.c: (ev_window_cmd_file_properties): Rework properties code to take only EvPropertyInfo in the constructor so that it can be useful for nautilus plugin too. Deal with backends that doesnt support some properties. Make set property code generic.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/ev-poppler.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc
index 684812c..7f2330d 100644
--- a/pdf/ev-poppler.cc
+++ b/pdf/ev-poppler.cc
@@ -23,6 +23,7 @@
#include <poppler.h>
#include <poppler-document.h>
#include <poppler-page.h>
+#include <glib/gi18n.h>
#include "ev-poppler.h"
#include "ev-ps-exporter.h"
@@ -335,7 +336,9 @@ pdf_document_get_info (EvDocument *document)
EV_DOCUMENT_INFO_PRODUCER |
EV_DOCUMENT_INFO_CREATION_DATE |
EV_DOCUMENT_INFO_MOD_DATE |
- EV_DOCUMENT_INFO_LINEARIZED;
+ EV_DOCUMENT_INFO_LINEARIZED |
+ EV_DOCUMENT_INFO_N_PAGES |
+ EV_DOCUMENT_INFO_SECURITY;
g_object_get (PDF_DOCUMENT (document)->document,
@@ -432,6 +435,17 @@ pdf_document_get_info (EvDocument *document)
if (permissions & POPPLER_PERMISSIONS_OK_TO_ADD_NOTES) {
info->permissions |= EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES;
}
+
+ info->n_pages = ev_document_get_n_pages (document);
+
+ if (ev_document_security_has_document_security (EV_DOCUMENT_SECURITY (document))) {
+ /* translators: this is the document security state */
+ info->security = g_strdup (_("Yes"));
+ } else {
+ /* translators: this is the document security state */
+ info->security = g_strdup (_("No"));
+ }
+
return info;
}