]> www.fi.muni.cz Git - evince.git/blobdiff - ps/ps.c
Implement launch links. Delegate external link opening to the window.
[evince.git] / ps / ps.c
diff --git a/ps/ps.c b/ps/ps.c
index c95c8152c683dd7b5dee07d2fd30568cde16dc53..e79fb0631957dab61aff8fe589d175995477d829 100644 (file)
--- a/ps/ps.c
+++ b/ps/ps.c
@@ -133,7 +133,7 @@ pages_new(struct page *pages, int current, int maxpages)
  *      Page Size (for the Page Size), Bounding Box (to minimize backing
  *      pixmap size or determine window size for encapsulated PostScript), 
  *      Orientation of Paper (for default transformation matrix), and
- *      Page Order.  The title and CreationDate are also retrieved to
+ *      Page Order.  The Title, Creator, and CreationDate are also retrieved to
  *      help identify the document.
  *
  *      The following comments are examined:
@@ -144,6 +144,7 @@ pages_new(struct page *pages, int current, int maxpages)
  *
  *      %!PS-Adobe-* [EPSF-*]
  *      %%BoundingBox: <int> <int> <int> <int>|(atend)
+ *      %%Creator: <textline>
  *      %%CreationDate: <textline>
  *      %%Orientation: Portrait|Landscape|(atend)
  *      %%Pages: <uint> [<int>]|(atend)
@@ -348,6 +349,9 @@ psscan(FILE * file, int respect_eof, const gchar * fname)
     else if(doc->date == NULL && iscomment(line + 2, "CreationDate:")) {
       doc->date = gettextline(line + length("%%CreationDate:"));
     }
+    else if(doc->creator == NULL && iscomment(line + 2, "Creator:")) {
+      doc->creator = gettextline(line + length("%%Creator:"));
+    }
     else if(bb_set == NONE && iscomment(line + 2, "BoundingBox:")) {
       sscanf(line + length("%%BoundingBox:"), "%256s", text);
       if(strcmp(text, "(atend)") == 0) {
@@ -1155,6 +1159,8 @@ psfree(doc)
       g_free(doc->title);
     if(doc->date)
       g_free(doc->date);
+    if(doc->creator)
+      g_free(doc->creator);
     if(doc->pages)
       g_free(doc->pages);
     if(doc->size)