[gnome-commander] Fixed problem #595097 (build error for poppler >= 0.11.3)



commit eada5b0f65cf133cc07bc73038fce22f9468d52e
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 2f904bc..ea13533 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,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 5c9c3c0..5bf0ced 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 0aebccc..350cfce 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -6011,6 +6011,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]