]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure pages_per_sheet is always >= 1. Fixes bug #569328.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 1 Feb 2009 10:35:22 +0000 (10:35 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 1 Feb 2009 10:35:22 +0000 (10:35 +0000)
2009-02-01  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/ev-print-operation.c:
(ev_print_operation_export_print_dialog_response_cb):

Make sure pages_per_sheet is always >= 1. Fixes bug #569328.

svn path=/trunk/; revision=3397

ChangeLog
shell/ev-print-operation.c

index 4215dc3758fb595e9076503f8b6d6525b2584408..d27c65f11c959595515af5b8b64c8d25b729bcf8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-01  Carlos Garcia Campos  <carlosgc@gnome.org>
+       
+       * shell/ev-print-operation.c:
+       (ev_print_operation_export_print_dialog_response_cb):
+
+       Make sure pages_per_sheet is always >= 1. Fixes bug #569328.
+       
 2009-02-01  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/pdf/ev-poppler.cc: (ev_link_dest_from_dest):
index 3723bd81183356d898ea43bb8ed3e186b97f2065..44ce674b12d181a6d54279cdc568c182cdcaeca6 100644 (file)
@@ -1072,7 +1072,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
                height *= scale;
        }
 
-       export->pages_per_sheet = gtk_print_settings_get_number_up (print_settings);
+       export->pages_per_sheet = MAX (1, gtk_print_settings_get_number_up (print_settings));
        
        export->copies = gtk_print_settings_get_n_copies (print_settings);
        export->collate = gtk_print_settings_get_collate (print_settings);
@@ -1108,7 +1108,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
        export->fc.paper_width = width;
        export->fc.paper_height = height;
        export->fc.duplex = FALSE;
-       export->fc.pages_per_sheet = MAX (1, export->pages_per_sheet);
+       export->fc.pages_per_sheet = export->pages_per_sheet;
 
        if (ev_print_queue_is_empty (op->document))
                ev_print_operation_export_begin (export);