[gnome-commander/gcmd-1-2-8] Fixed problem #595097 (build error for poppler >= 0.11.3)



commit 00c6af0f90da40e2f63567c3e15039a7b8db7c2d
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Sep 14 23:46:34 2009 +0200

    Fixed problem #595097 (build error for poppler >= 0.11.3)

 NEWS                               |    1 +
 configure.in                       |    3 +++
 doc/C/gnome-commander.xml          |    3 +++
 src/tags/gnome-cmd-tags-poppler.cc |    5 +++++
 4 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index bf73b5a..bc2f711 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ gnome-commander 1.2.8.2
 
 Bug fixes:
  * Fixed problem #591944 (permissions set to 000 after chmod)
+ * Fixed problem #595097 (build error for poppler >= 0.11.3)
  * Fixed problem with broken file icon after renaming a symbolic link
 
 
diff --git a/configure.in b/configure.in
index 1d83002..d25191f 100644
--- a/configure.in
+++ b/configure.in
@@ -236,6 +236,9 @@ AC_ARG_WITH(poppler, [  --without-poppler        disable PDF support])
 have_pdf=no
 if test x$with_poppler != xno; then
     PKG_CHECK_MODULES(POPPLER, poppler >= $POPPLER_REQ, have_pdf=yes, have_pdf=no)
+    if pkg-config --max-version=0.11.2 poppler; then
+        AC_DEFINE(POPPLER_HAS_GET_PDF_VERSION, 1, [Define to 1 if poppler has support for PDFDoc::getPDFVersion()])
+    fi
 fi
 if test "x$have_pdf" = "xyes"; then
    AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 0c9ec97..901634e 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -5995,6 +5995,9 @@
                             <para>Fixed problem #591944 (permissions set to 000 after chmod)</para>
                         </listitem>
                         <listitem>
+                            <para>Fixed problem #595097 (build error for poppler >= 0.11.3)</para>
+                        </listitem>
+                        <listitem>
                             <para>Fixed problem with broken file icon after renaming a symbolic link</para>
                         </listitem>
                     </itemizedlist>
diff --git a/src/tags/gnome-cmd-tags-poppler.cc b/src/tags/gnome-cmd-tags-poppler.cc
index 6484ffb..f1b98c9 100644
--- a/src/tags/gnome-cmd-tags-poppler.cc
+++ b/src/tags/gnome-cmd-tags-poppler.cc
@@ -320,7 +320,12 @@ void gcmd_tags_poppler_load_metadata(GnomeCmdFile *f)
 
     f->metadata->mark_as_accessed(TAG_DOC);
 
+#ifdef POPPLER_HAS_GET_PDF_VERSION
     f->metadata->addf(TAG_PDF_VERSION, "%.1f", doc.getPDFVersion());
+#else
+    f->metadata->addf(TAG_PDF_VERSION, "%u.%u", doc.getPDFMajorVersion(), doc.getPDFMinorVersion());
+#endif
+
     f->metadata->addf(TAG_DOC_PAGECOUNT, "%i", doc.getNumPages());
     f->metadata->addf(TAG_PDF_OPTIMIZED, "%u", doc.isLinearized());
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]