]> www.fi.muni.cz Git - evince.git/commitdiff
Fix build with poppler 0.5.9.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 2 Jul 2007 08:31:23 +0000 (08:31 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 2 Jul 2007 08:31:23 +0000 (08:31 +0000)
2007-07-02  Carlos Garcia Campos  <carlosgc@gnome.org>
* configure.ac:
* backend/pdf/ev-poppler.cc: (pdf_selection_render_selection):
Fix build with poppler 0.5.9.

svn path=/branches/gnome-2-18/; revision=2536

ChangeLog
backend/pdf/ev-poppler.cc
configure.ac

index 4c7215a6bef2abe08079dd5814eec82403b252b5..f945ee48abbfe040441aae7e469a5b4e9a5ac2c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-02  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * configure.ac:
+       * backend/pdf/ev-poppler.cc: (pdf_selection_render_selection):
+
+       Fix build with poppler 0.5.9. 
+       
 2007-07-01  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-sidebar-links.c: (job_finished_callback):
index 375489f5903815c660a8b94099230fca90178a42..7e084dbeb7c1e5fd0e1e39f4d49525e946546f43 100644 (file)
@@ -1623,13 +1623,23 @@ pdf_selection_render_selection (EvSelection      *selection,
                                           TRUE, 8,
                                           width, height);
        }
-       
+
+#if POPPLER_VERSION == 5
        poppler_page_render_selection (POPPLER_PAGE (rc->data),
                                       rc->scale, rc->rotation, *pixbuf,
                                       (PopplerRectangle *)points,
                                       (PopplerRectangle *)old_points,
                                       text,
                                       base);
+#else /* POPPLER_VERSION == 9 */
+       poppler_page_render_selection_to_pixbuf (POPPLER_PAGE (rc->data),
+                                                rc->scale, rc->rotation, *pixbuf,
+                                                (PopplerRectangle *)points,
+                                                (PopplerRectangle *)old_points,
+                                                POPPLER_SELECTION_NORMAL,
+                                                text,
+                                                base);
+#endif
 }
 
 
index 5224e0da5478de4a0e1ba0dd6bb15cb43ea83241..e75a7968a39b0835f9fe33da39e7bff3c42f9699 100644 (file)
@@ -200,7 +200,8 @@ AC_ARG_ENABLE(pdf,
 
 if test "x$enable_pdf" = "xyes"; then
     POPPLER_REQUIRED=0.5.4
-    PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED,enable_pdf=yes,enable_pdf=no)
+    POPPLER_MAX_REQUIRED=0.5.9
+    PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED poppler-glib <= $POPPLER_MAX_REQUIRED, enable_pdf=yes,enable_pdf=no)
 
     if test "x$enable_pdf" = "xyes"; then
            AC_DEFINE([ENABLE_PDF], [1], [Enable pdf support.])
@@ -219,6 +220,9 @@ if test "x$enable_pdf" = "xyes"; then
            if test x$enable_cairo_pdf == xyes; then
                    AC_DEFINE([HAVE_CAIRO_PDF], [1], [defined if cairo-pdf is available])
             fi
+
+           POPPLER_VERSION=`$PKG_CONFIG --modversion poppler-glib | sed 's/0\.5\.\([[49]]\)/\1/'`
+           AC_DEFINE_UNQUOTED(POPPLER_VERSION, $POPPLER_VERSION, [Poppler version.])
     else
            AC_MSG_WARN("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
     fi