]> www.fi.muni.cz Git - evince.git/commitdiff
Fix a crash when printing with the gnome-print dialog. Fixes bug #488939.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 22 Oct 2007 13:25:20 +0000 (13:25 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 22 Oct 2007 13:25:20 +0000 (13:25 +0000)
2007-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
* backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_begin):
* shell/ev-print-job.c: (ev_print_job_class_init):
Fix a crash when printing with the gnome-print dialog. Fixes bug
#488939.

svn path=/trunk/; revision=2713

ChangeLog
backend/pdf/ev-poppler.cc
shell/ev-print-job.c

index dab5687d0a2d9c3c531349c92057558efc5e6e59..87f92bbc875f9aef22e44d08b14bc618b161df9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_begin):
+       * shell/ev-print-job.c: (ev_print_job_class_init):
+
+       Fix a crash when printing with the gnome-print dialog. Fixes bug
+       #488939.
+       
 2007-10-18  Sebastien Bacher  <seb128@ubuntu.com>
 
        * backend/pixbuf/pixbuf-document.c:
index 4a783416e4a60ed5beaf743a56fe2c23025b3273..c7f4eeed29652f875519fc4beeccdeec060edb09 100644 (file)
@@ -1530,7 +1530,7 @@ pdf_document_file_exporter_begin (EvFileExporter        *exporter,
        pdf_document->print_ctx = g_new0 (PdfPrintContext, 1);
        ctx = pdf_document->print_ctx;
        ctx->format = fc->format;
-       ctx->pages_per_sheet = fc->pages_per_sheet;
+       ctx->pages_per_sheet = CLAMP (fc->pages_per_sheet, 1, 16);
 
        ctx->paper_width = fc->paper_width;
        ctx->paper_height = fc->paper_height;
index d042ab680214ce67824d87ecf30d45e3f15b1bee..39e334be08121efd196c0e09a73daf265f10354a 100644 (file)
@@ -176,6 +176,7 @@ ev_print_job_class_init (EvPrintJobClass *ev_print_job_class)
 static void
 ev_print_job_init (EvPrintJob *ev_print_job)
 {
+       ev_print_job->fc.pages_per_sheet = 1;
 }
 
 void