diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-10-22 13:25:20 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-10-22 13:25:20 (GMT) |
commit | 80db4b8b5f7e0e49a9dd5208dcd55ab7cb80b16c (patch) | |
tree | 776cb94730e1b63b43d29fda15b25ba5c449bb89 | |
parent | b70b608a4ff0f7472d2b7ab5935cbd8db4718998 (diff) |
Fix a crash when printing with the gnome-print dialog. Fixes bug #488939.
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
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | backend/pdf/ev-poppler.cc | 2 | ||||
-rw-r--r-- | shell/ev-print-job.c | 1 |
3 files changed, 10 insertions, 1 deletions
@@ -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: diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 4a78341..c7f4eee 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -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; diff --git a/shell/ev-print-job.c b/shell/ev-print-job.c index d042ab6..39e334b 100644 --- a/shell/ev-print-job.c +++ b/shell/ev-print-job.c @@ -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 |