[poppler] 5 commits - CMakeLists.txt glib/CMakeLists.txt glib/poppler-features.h.cmake qt4/demos qt4/src qt4/tests

Pino Toscano pino at kemper.freedesktop.org
Fri Jun 5 02:10:56 PDT 2009


 CMakeLists.txt                 |    5 ++++-
 glib/CMakeLists.txt            |    2 +-
 glib/poppler-features.h.cmake  |   11 ++++++++++-
 qt4/demos/Makefile.am          |    3 +++
 qt4/src/poppler-qt4.h          |    2 ++
 qt4/tests/test-poppler-qt4.cpp |    6 +++++-
 6 files changed, 25 insertions(+), 4 deletions(-)

New commits:
commit c94e476dbff9e527c72e52377d830f35f29ba3d6
Author: Pino Toscano <pino at kde.org>
Date:   Fri Jun 5 11:09:44 2009 +0200

    when showing the tooltip for a text rect, show also its index in the page text boxes list

diff --git a/qt4/tests/test-poppler-qt4.cpp b/qt4/tests/test-poppler-qt4.cpp
index 9b92d05..0ec917f 100644
--- a/qt4/tests/test-poppler-qt4.cpp
+++ b/qt4/tests/test-poppler-qt4.cpp
@@ -124,12 +124,16 @@ void PDFDisplay::keyPressEvent( QKeyEvent *e )
 
 void PDFDisplay::mousePressEvent( QMouseEvent *e )
 {
+  int i = 0;
   foreach(Poppler::TextBox *tb, textRects)
   {
     if (tb->boundingBox().contains(e->pos()))
     {
-      QToolTip::showText(e->globalPos(), tb->text(), this);
+      QString tt = QString("Text: \"%1\"\nIndex in text list: %2").arg(tb->text()).arg(i);
+      QToolTip::showText(e->globalPos(), tt, this);
+      break;
     }
+    ++i;
   }
 }
 
commit 2298acac267257b1916c802bdb902428e69e683b
Author: Pino Toscano <pino at kde.org>
Date:   Fri Jun 5 11:08:51 2009 +0200

    [Qt4 apidox] FontInterator is new in 0.12

diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
index 257162e..fd384f5 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -234,6 +234,8 @@ while (it->hasNext()) {
   // do something with the fonts
 }
        \endcode
+
+       \since 0.12
     */
     class POPPLER_QT4_EXPORT FontIterator {
     friend class Document;
commit 37c48c2521c623c485841472c4a174a1841aea33
Author: Pino Toscano <pino at kde.org>
Date:   Fri Jun 5 10:54:30 2009 +0200

    [CMake] Add poppler version defines and version check macro
    
    Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and
    POPPLER_CHECK_VERSION macro. FDO bug #22091.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e81b39..0fbc49a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,10 @@ find_package(PkgConfig)
 include(MacroEnsureVersion)
 include(MacroBoolTo01)
 
-set(POPPLER_VERSION "0.11.0")
+set(POPPLER_MAJOR_VERSION "0")
+set(POPPLER_MINOR_VERSION "11")
+set(POPPLER_MICRO_VERSION "0")
+set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
 # command line switches
 option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
diff --git a/glib/poppler-features.h.cmake b/glib/poppler-features.h.cmake
index 76ff423..1f79ce4 100644
--- a/glib/poppler-features.h.cmake
+++ b/glib/poppler-features.h.cmake
@@ -21,4 +21,13 @@
 
 @CAIRO_FEATURE@
 
+#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
+#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
+#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+  (POPPLER_MAJOR_VERSION > (major) || \
+   (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+   (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
 #endif /* __POPPLER_FEATURES_H__ */
commit 26f6fb1d79c2589829cd896d57da63d16641f307
Author: Pino Toscano <pino at kde.org>
Date:   Fri Jun 5 10:51:26 2009 +0200

    [CMake] switch poppler-features.h.cmake to a more autotools-like syntax

diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index 4caf7e7..2cb207b 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -16,7 +16,7 @@ if (GDK_FOUND)
   add_definitions(${GDK2_CFLAGS})
 endif (GDK_FOUND)
 
-configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h)
+configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h @ONLY)
 
 if (GTK_FOUND)
   add_subdirectory(demo)
diff --git a/glib/poppler-features.h.cmake b/glib/poppler-features.h.cmake
index d6507e7..76ff423 100644
--- a/glib/poppler-features.h.cmake
+++ b/glib/poppler-features.h.cmake
@@ -19,6 +19,6 @@
 #ifndef __POPPLER_FEATURES_H__
 #define __POPPLER_FEATURES_H__
 
-${CAIRO_FEATURE}
+ at CAIRO_FEATURE@
 
 #endif /* __POPPLER_FEATURES_H__ */
commit 89704635b727db42f6c72ba101091eb7eddb967a
Author: Pino Toscano <pino at kde.org>
Date:   Fri Jun 5 10:39:17 2009 +0200

    [Qt4 demo] compile the new thumbnail module with autotools as well

diff --git a/qt4/demos/Makefile.am b/qt4/demos/Makefile.am
index 591bb82..140d62c 100644
--- a/qt4/demos/Makefile.am
+++ b/qt4/demos/Makefile.am
@@ -42,6 +42,8 @@ poppler_qt4viewer_SOURCES =			\
 	pageview.h				\
 	permissions.cpp				\
 	permissions.h				\
+	thumbnails.cpp				\
+	thumbnails.h				\
 	toc.cpp					\
 	toc.h					\
 	viewer.cpp				\
@@ -56,6 +58,7 @@ navigationtoolbar.$(OBJEXT): navigationtoolbar.moc
 optcontent.$(OBJEXT): optcontent.moc
 pageview.$(OBJEXT): pageview.moc
 permissions.$(OBJEXT): permissions.moc
+thumbnails.$(OBJEXT): thumbnails.moc
 toc.$(OBJEXT): toc.moc
 viewer.$(OBJEXT): viewer.moc
 


More information about the poppler mailing list