]> www.fi.muni.cz Git - evince.git/commitdiff
Adapt to new poppler api
authorMarco Pesenti Gritti <mpg@redhat.com>
Wed, 18 May 2005 17:55:18 +0000 (17:55 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Wed, 18 May 2005 17:55:18 +0000 (17:55 +0000)
2005-05-18  Marco Pesenti Gritti <mpg@redhat.com>

        * 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

ChangeLog
backend/ev-ps-exporter.c
backend/ev-ps-exporter.h
pdf/ev-poppler.cc
ps/ps-document.c
shell/ev-print-job.c

index 9c56787862c51a264c8eced38d80462c2d3d3b96..6df464b65a4d37f6b0bd1b29b218349b9755c6f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-18  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * 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 <mpg@redhat.com>
 
        * cut-n-paste/zoom-control/ephy-zoom-control.c:
@@ -250,6 +260,20 @@ Wed May 11 01:18:29 2005  Jonathan Blandford  <jrb@redhat.com>
        gone. Maybe there is a better way to cleanup reference handling
        in page action though...
 
+2005-05-10  Juerg Billeter  <j@bitron.ch>
+
+       * 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  <j@bitron.ch>
 
        * shell/ev-print-job.c: (ev_print_job_use_print_dialog_settings),
index f5b55683a7885d285794915f53c2f913b22e50ad..54a2dd4f102820a0f8faedd4a6c958d9c4ad5e14 100644 (file)
@@ -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
index 58917e8d442f6e590782a83fd191ade2b7dbf4fa..ae746a1b9e1e3d82fc37ef8a73f43af275609043 100644 (file)
@@ -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);
 
index 32613558dcdd55a7d00e2c73153e347739f03b72..082c3dc971058c600bc5f5b1028e1409ca5ae41e 100644 (file)
@@ -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
index a794e9956340dd0172a8e5689a454a4ea095b806..a155207b1b58f85a6424817cb808ffc9143fbb8e 100644 (file)
@@ -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);
 
index 8363639861105632257be2e7f1de722c252e4608..e7c1ce1b431d065a349d4f4aab539c98810656c1 100644 (file)
@@ -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;