From: Marco Pesenti Gritti Date: Wed, 18 May 2005 17:55:18 +0000 (+0000) Subject: Adapt to new poppler api X-Git-Tag: EVINCE_0_3_1~11 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=3f3b7a054f3b5d704fc1389b4551a4bed49e63bc;p=evince.git Adapt to new poppler api 2005-05-18 Marco Pesenti Gritti * backend/ev-ps-exporter.c: (ev_ps_exporter_begin): * backend/ev-ps-exporter.h: * pdf/ev-poppler.cc: * ps/ps-document.c: (ps_document_ps_export_begin): * shell/ev-print-job.c: (idle_print_handler): Adapt to new poppler api --- diff --git a/ChangeLog b/ChangeLog index 9c567878..6df464b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-05-18 Marco Pesenti Gritti + + * backend/ev-ps-exporter.c: (ev_ps_exporter_begin): + * backend/ev-ps-exporter.h: + * pdf/ev-poppler.cc: + * ps/ps-document.c: (ps_document_ps_export_begin): + * shell/ev-print-job.c: (idle_print_handler): + + Adapt to new poppler api + 2005-05-18 Marco Pesenti Gritti * cut-n-paste/zoom-control/ephy-zoom-control.c: @@ -250,6 +260,20 @@ Wed May 11 01:18:29 2005 Jonathan Blandford gone. Maybe there is a better way to cleanup reference handling in page action though... +2005-05-10 Juerg Billeter + + * backend/ev-ps-exporter.c: (ev_ps_exporter_begin): + * backend/ev-ps-exporter.h: + * pdf/ev-poppler.cc: (pdf_document_ps_exporter_begin): + * ps/ps-document.c: (ps_document_ps_export_begin): + + Change api to pass print range to ps_exporter_begin. The pdf backend + requires this information. + + * shell/ev-print-job.c: (idle_print_handler): + + Adapt to api change + 2005-05-10 Juerg Billeter * shell/ev-print-job.c: (ev_print_job_use_print_dialog_settings), diff --git a/backend/ev-ps-exporter.c b/backend/ev-ps-exporter.c index f5b55683..54a2dd4f 100644 --- a/backend/ev-ps-exporter.c +++ b/backend/ev-ps-exporter.c @@ -47,11 +47,12 @@ ev_ps_exporter_get_type (void) } void -ev_ps_exporter_begin (EvPSExporter *exporter, const char *filename) +ev_ps_exporter_begin (EvPSExporter *exporter, const char *filename, + int first_page, int last_page) { EvPSExporterIface *iface = EV_PS_EXPORTER_GET_IFACE (exporter); - iface->begin (exporter, filename); + iface->begin (exporter, filename, first_page, last_page); } void diff --git a/backend/ev-ps-exporter.h b/backend/ev-ps-exporter.h index 58917e8d..ae746a1b 100644 --- a/backend/ev-ps-exporter.h +++ b/backend/ev-ps-exporter.h @@ -42,14 +42,17 @@ struct _EvPSExporterIface { /* Methods */ void (* begin) (EvPSExporter *exporter, - const char *filename); + const char *filename, + int first_page, + int last_page); void (* do_page) (EvPSExporter *exporter, int page); void (* end) (EvPSExporter *exporter); }; GType ev_ps_exporter_get_type (void); -void ev_ps_exporter_begin (EvPSExporter *exporter, const char *filename); +void ev_ps_exporter_begin (EvPSExporter *exporter, const char *filename, + int first_page, int last_page); void ev_ps_exporter_do_page (EvPSExporter *exporter, int page); void ev_ps_exporter_end (EvPSExporter *exporter); diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 32613558..082c3dc9 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -868,14 +868,13 @@ pdf_document_find_iface_init (EvDocumentFindIface *iface) } static void -pdf_document_ps_exporter_begin (EvPSExporter *exporter, const char *filename) +pdf_document_ps_exporter_begin (EvPSExporter *exporter, const char *filename, + int first_page, int last_page) { PdfDocument *pdf_document = PDF_DOCUMENT (exporter); - int n_pages; - n_pages = pdf_document_get_n_pages (EV_DOCUMENT (exporter)); - pdf_document->ps_file = poppler_ps_file_new (pdf_document->document, - filename, n_pages); + pdf_document->ps_file = poppler_ps_file_new (pdf_document->document, filename, + first_page, last_page); } static void diff --git a/ps/ps-document.c b/ps/ps-document.c index a794e995..a155207b 100644 --- a/ps/ps-document.c +++ b/ps/ps-document.c @@ -1389,7 +1389,8 @@ ps_document_document_iface_init (EvDocumentIface *iface) } static void -ps_document_ps_export_begin (EvPSExporter *exporter, const char *filename) +ps_document_ps_export_begin (EvPSExporter *exporter, const char *filename, + int first_page, int last_page) { PSDocument *document = PS_DOCUMENT (exporter); diff --git a/shell/ev-print-job.c b/shell/ev-print-job.c index 83636398..e7c1ce1b 100644 --- a/shell/ev-print-job.c +++ b/shell/ev-print-job.c @@ -258,7 +258,8 @@ idle_print_handler (EvPrintJob *job) if (!job->printing) { ev_document_doc_mutex_lock (); ev_ps_exporter_begin (EV_PS_EXPORTER (job->document), - job->temp_file); + job->temp_file, job->first_page, + job->last_page); ev_document_doc_mutex_unlock (); job->next_page = job->first_page; job->printing = TRUE;