]> www.fi.muni.cz Git - evince.git/commitdiff
Use ev_page_cache_get_size instead of EvDocument directly
authorCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 29 Oct 2009 17:05:46 +0000 (18:05 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 29 Oct 2009 17:05:46 +0000 (18:05 +0100)
shell/ev-print-operation.c

index 730db80a747c72ffd7f08f8c58d56516922a469e..8c27cd3998bdf81c14dcd82783f60576d0e9984f 100644 (file)
@@ -1644,10 +1644,11 @@ ev_print_operation_print_request_page_setup (EvPrintOperationPrint *print,
                                             GtkPageSetup          *setup)
 {
        EvPrintOperation *op = EV_PRINT_OPERATION (print);
-       gdouble           width, height;
+       gint              width, height;
 
-       ev_document_get_page_size (op->document, page_nr,
-                                  &width, &height);
+       ev_page_cache_get_size (ev_page_cache_get (op->document),
+                               page_nr, 0, 1.0,
+                               &width, &height);
        if (width > height)
                gtk_page_setup_set_orientation (setup, GTK_PAGE_ORIENTATION_LANDSCAPE);
        else