From: Carlos Garcia Campos Date: Sun, 1 Feb 2009 10:35:22 +0000 (+0000) Subject: Make sure pages_per_sheet is always >= 1. Fixes bug #569328. X-Git-Tag: EVINCE_2_25_90~10 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=dec308817b9817f6b4ed36b658e5123689bf6611;p=evince.git Make sure pages_per_sheet is always >= 1. Fixes bug #569328. 2009-02-01 Carlos Garcia Campos * 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 --- diff --git a/ChangeLog b/ChangeLog index 4215dc37..d27c65f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-01 Carlos Garcia Campos + + * 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 * backend/pdf/ev-poppler.cc: (ev_link_dest_from_dest): diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c index 3723bd81..44ce674b 100644 --- a/shell/ev-print-operation.c +++ b/shell/ev-print-operation.c @@ -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);