]> www.fi.muni.cz Git - evince.git/commitdiff
implement get/set properties
authorJeff Muizelaar <jeff@nit.ca>
Thu, 13 Jan 2005 09:32:55 +0000 (09:32 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Thu, 13 Jan 2005 09:32:55 +0000 (09:32 +0000)
2005-01-12  Jeff Muizelaar  <jeff@nit.ca>

        * pixbuf/pixbuf-document.c: (pixbuf_document_class_init),
        (pixbuf_document_set_property), (pixbuf_document_get_property):

        implement get/set properties

ChangeLog
pdf/xpdf/pdf-document.cc
ps/ps-document.c

index daf46ffd0ec741ed1729b60bd4e53b338f2089df..1f8c644f5e301dd696859ba672a5adb2ec2d316a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2005-01-12  Jeff Muizelaar  <jeff@nit.ca>
+
+       * pixbuf/pixbuf-document.c: (pixbuf_document_class_init),
+       (pixbuf_document_set_property), (pixbuf_document_get_property):
+
+       implement get/set properties
+
+2005-01-12  Jeff Muizelaar  <jeff@nit.ca>
+
+       * pdf/xpdf/pdf-document.cc: (pdf_info_dict_get_string):
+       
+       return NULL instead of "Unknown", letting the title get set to
+       the filename when the pdf has no title.
+
+2005-01-11  Marco Pesenti Gritti  <marco@gnome.org>
+
+       * ps/ps-document.c: (ps_document_get_page_count),
+       (ps_document_goto_page):
+
 2005-01-11  Marco Pesenti Gritti  <marco@gnome.org>
 
        * shell/ev-history.c: (ev_history_get_property),
index 929435669f2010061deadfd777345d5602a639c1..a64dc4cecd3abfc311a24f29ed2bec51600ad116 100644 (file)
@@ -916,7 +916,7 @@ pdf_info_dict_get_string (Dict *info_dict, const gchar *key) {
 
        if (!info_dict->lookup ((gchar *)key, &obj)->isString ()) {
                obj.free ();
-               return g_strdup (_("Unknown"));
+               return NULL;
        }
 
        value = obj.getString ();
index 09e4ef3d32016e25ee0c25c035597d0274f0122a..3796f7d0d818d645c01e1e8a1fb0fc276daae4b0 100644 (file)
@@ -1434,7 +1434,7 @@ ps_document_get_page_count(PSDocument * gs)
     if(gs->structured_doc)
       return gs->doc->numpages;
     else
-      return G_MAXINT;
+      return 1;
   }
   else
     return 0;
@@ -1454,6 +1454,8 @@ ps_document_goto_page(PSDocument * gs, gint page)
   if(page < 0)
     page = 0;
 
+  ps_document_set_page_size(gs, -1, page);
+
   if(gs->structured_doc && gs->doc) {
     if(page >= gs->doc->numpages)
       page = gs->doc->numpages - 1;
@@ -1470,8 +1472,6 @@ ps_document_goto_page(PSDocument * gs, gint page)
       gs->changed = TRUE;
     }
 
-    ps_document_set_page_size(gs, -1, page);
-
     gs->changed = FALSE;
 
     if(is_interpreter_ready(gs)) {