Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ps
diff options
context:
space:
mode:
authorWouter Bolsterlee <wbolster@cvs.gnome.org>2006-12-04 11:53:25 (GMT)
committer Wouter Bolsterlee <wbolster@src.gnome.org>2006-12-04 11:53:25 (GMT)
commit35512dd1ae66e5dbbeb490d3846dafcf150f1f28 (patch)
tree71ac4570190afa6c046b31490b8196cb14d97655 /ps
parent1f4859f8061b8a03e8f75a5cbd26f16c19155670 (diff)
Adds a paper size field to the properties dialog. Fixes bug #307315. Patch
2006-12-04 Wouter Bolsterlee <wbolster@cvs.gnome.org> * backend/ev-document-info.h: * data/evince-properties.glade: * pdf/ev-poppler.cc: * properties/ev-properties-view.c: (ev_regular_paper_size), (ev_properties_view_set_info): * ps/ps-document.c: (ps_document_get_info): Adds a paper size field to the properties dialog. Fixes bug #307315. Patch by Kasper Svendsen (with some i18n changes done by me).
Diffstat (limited to 'ps')
-rw-r--r--ps/ps-document.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ps/ps-document.c b/ps/ps-document.c
index e9c7ca5..1980010 100644
--- a/ps/ps-document.c
+++ b/ps/ps-document.c
@@ -1257,17 +1257,25 @@ ps_document_get_info (EvDocument *document)
{
EvDocumentInfo *info;
PSDocument *ps = PS_DOCUMENT (document);
+ int urx, ury, llx, lly;
info = g_new0 (EvDocumentInfo, 1);
info->fields_mask = EV_DOCUMENT_INFO_TITLE |
EV_DOCUMENT_INFO_FORMAT |
EV_DOCUMENT_INFO_CREATOR |
- EV_DOCUMENT_INFO_N_PAGES;
+ EV_DOCUMENT_INFO_N_PAGES |
+ EV_DOCUMENT_INFO_PAPER_SIZE;
+
info->title = g_strdup (ps->doc->title);
info->format = ps->doc->epsf ? g_strdup (_("Encapsulated PostScript"))
: g_strdup (_("PostScript"));
info->creator = g_strdup (ps->doc->creator);
info->n_pages = ev_document_get_n_pages (document);
+
+ get_page_box (PS_DOCUMENT (document), 0, &urx, &ury, &llx, &lly);
+
+ info->paper_width = (urx - llx) / 72.0f * 25.4f;
+ info->paper_height = (ury - lly) / 72.0f * 25.4f;
return info;
}