[poppler] 3 commits - configure.ac glib/demo glib/Makefile.am glib/poppler-page.h

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Tue Oct 28 02:36:56 PDT 2008


 configure.ac            |   10 ++++++++++
 glib/Makefile.am        |    4 +++-
 glib/demo/Makefile.am   |    5 ++++-
 glib/demo/annots.h      |    2 +-
 glib/demo/attachments.c |    4 ++--
 glib/demo/attachments.h |    2 +-
 glib/demo/fonts.h       |    2 +-
 glib/demo/forms.h       |    2 +-
 glib/demo/images.h      |    2 +-
 glib/demo/info.h        |    2 +-
 glib/demo/links.h       |    2 +-
 glib/demo/outline.h     |    2 +-
 glib/demo/page.h        |    2 +-
 glib/demo/render.h      |    2 +-
 glib/demo/transitions.h |    2 +-
 glib/demo/utils.h       |    2 +-
 glib/poppler-page.h     |    3 +--
 17 files changed, 32 insertions(+), 18 deletions(-)

New commits:
commit a5865dae5b414de5f6dbda2a512101050c374e06
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Oct 28 10:30:59 2008 +0100

    [glib] Add DISABLE_SINGLE_INCLUDES flags and fix glib-demo

diff --git a/configure.ac b/configure.ac
index d99769f..8b7ebe7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,7 @@ AC_SUBST(CAIRO_FEATURE)
 AC_SUBST(CAIRO_REQ)
 
 POPPLER_GLIB_DISABLE_DEPRECATED=""
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""
 
 GLIB_REQUIRED=2.6
 AC_ARG_ENABLE(poppler-glib,
@@ -247,6 +248,7 @@ fi
 if test x$enable_poppler_glib = xyes; then
   AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
   POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
+  POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DG_DISABLE_SINGLE_INCLUDES"
 fi
 AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes)
 
@@ -284,6 +286,7 @@ if test x$enable_poppler_glib = xyes; then
     AC_DEFINE(POPPLER_WITH_GDK,[1], [Have GDK])
     GDK_FEATURE="#define POPPLER_WITH_GDK 1"
     POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
+    POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
   else
     GDK_FEATURE=""
   fi
@@ -294,6 +297,7 @@ AC_SUBST(GDK_LIBS)
 AC_SUBST(GDK_FEATURE)
 
 AC_SUBST(POPPLER_GLIB_DISABLE_DEPRECATED)
+AC_SUBST(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
 
 AC_ARG_ENABLE(poppler-qt,
 	      AC_HELP_STRING([--disable-poppler-qt],
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 299ff00..187caed 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -20,7 +20,8 @@ INCLUDES =					\
 	$(FREETYPE_CFLAGS)			\
 	$(FONTCONFIG_CFLAGS)                    \
 	$(cairo_includes)			\
-	$(POPPLER_GLIB_DISABLE_DEPRECATED)
+	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
+	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
 
 stamp_files = stamp-poppler-enums.h
 
diff --git a/glib/demo/Makefile.am b/glib/demo/Makefile.am
index 41e071d..a79dbec 100644
--- a/glib/demo/Makefile.am
+++ b/glib/demo/Makefile.am
@@ -3,7 +3,8 @@ INCLUDES = 					\
 	-I$(top_builddir)/glib			\
 	$(GTK_TEST_CFLAGS)			\
 	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
-	-DGTK_DISABLE_DEPRECATED
+	-DGTK_DISABLE_DEPRECATED		\
+	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
 
 if BUILD_GTK_TEST
 noinst_PROGRAMS = poppler-glib-demo
diff --git a/glib/demo/annots.h b/glib/demo/annots.h
index 01a1fb8..844e4f5 100644
--- a/glib/demo/annots.h
+++ b/glib/demo/annots.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _ANNOTS_H_
diff --git a/glib/demo/attachments.h b/glib/demo/attachments.h
index 330b3c1..36dab82 100644
--- a/glib/demo/attachments.h
+++ b/glib/demo/attachments.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _ATTACHMENTS_H_
diff --git a/glib/demo/fonts.h b/glib/demo/fonts.h
index 42ccc2e..b13447c 100644
--- a/glib/demo/fonts.h
+++ b/glib/demo/fonts.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _FONTS_H_
diff --git a/glib/demo/forms.h b/glib/demo/forms.h
index 4e0c9c0..5b793bd 100644
--- a/glib/demo/forms.h
+++ b/glib/demo/forms.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _FORMS_H_
diff --git a/glib/demo/images.h b/glib/demo/images.h
index 60a79db..6180c3b 100644
--- a/glib/demo/images.h
+++ b/glib/demo/images.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _IMAGES_H_
diff --git a/glib/demo/info.h b/glib/demo/info.h
index e96ee00..a8b34d4 100644
--- a/glib/demo/info.h
+++ b/glib/demo/info.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _INFO_H_
diff --git a/glib/demo/links.h b/glib/demo/links.h
index 4e1ec2a..b7dbaeb 100644
--- a/glib/demo/links.h
+++ b/glib/demo/links.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _LINKS_H_
diff --git a/glib/demo/outline.h b/glib/demo/outline.h
index a96f0c9..61b8238 100644
--- a/glib/demo/outline.h
+++ b/glib/demo/outline.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _OUTLINE_H_
diff --git a/glib/demo/page.h b/glib/demo/page.h
index 7968e44..5b86a81 100644
--- a/glib/demo/page.h
+++ b/glib/demo/page.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _PAGE_H_
diff --git a/glib/demo/render.h b/glib/demo/render.h
index 5e76a3e..46f7039 100644
--- a/glib/demo/render.h
+++ b/glib/demo/render.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _RENDER_H_
diff --git a/glib/demo/transitions.h b/glib/demo/transitions.h
index 31d3677..11d8bd4 100644
--- a/glib/demo/transitions.h
+++ b/glib/demo/transitions.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _TRANSITIONS_H_
diff --git a/glib/demo/utils.h b/glib/demo/utils.h
index d2d46d9..a757482 100644
--- a/glib/demo/utils.h
+++ b/glib/demo/utils.h
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <poppler.h>
 
 #ifndef _UTILS_H_
commit e07bfb54b77430e10e50c33151cf0afc9854006c
Author: Christian Persch <chpe at gnome.org>
Date:   Tue Oct 28 10:29:51 2008 +0100

    [glib] Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES

diff --git a/glib/poppler-page.h b/glib/poppler-page.h
index 0cd5741..9351048 100644
--- a/glib/poppler-page.h
+++ b/glib/poppler-page.h
@@ -24,8 +24,7 @@
 #include "poppler.h"
 
 #ifdef POPPLER_WITH_GDK
-#include <gdk/gdkregion.h>
-#include <gdk/gdkcolor.h>
+#include <gdk/gdk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #endif
 
commit a84d272ffd2b593ac98148e71b83fba299c60fea
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Oct 28 10:01:00 2008 +0100

    [glib] Add disable deprecated compile flags and fix compile warnings

diff --git a/configure.ac b/configure.ac
index 7ecc037..d99769f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -229,6 +229,8 @@ fi
 AC_SUBST(CAIRO_FEATURE)
 AC_SUBST(CAIRO_REQ)
 
+POPPLER_GLIB_DISABLE_DEPRECATED=""
+
 GLIB_REQUIRED=2.6
 AC_ARG_ENABLE(poppler-glib,
               AC_HELP_STRING([--disable-poppler-glib],
@@ -244,6 +246,7 @@ elif test x$enable_poppler_glib = xtry; then
 fi
 if test x$enable_poppler_glib = xyes; then
   AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
+  POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
 fi
 AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes)
 
@@ -280,6 +283,7 @@ if test x$enable_poppler_glib = xyes; then
   if test x$enable_gdk = xyes; then
     AC_DEFINE(POPPLER_WITH_GDK,[1], [Have GDK])
     GDK_FEATURE="#define POPPLER_WITH_GDK 1"
+    POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
   else
     GDK_FEATURE=""
   fi
@@ -289,6 +293,8 @@ AC_SUBST(GDK_CFLAGS)
 AC_SUBST(GDK_LIBS)
 AC_SUBST(GDK_FEATURE)
 
+AC_SUBST(POPPLER_GLIB_DISABLE_DEPRECATED)
+
 AC_ARG_ENABLE(poppler-qt,
 	      AC_HELP_STRING([--disable-poppler-qt],
 			     [Don't compile poppler qt wrapper.]),
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 885e7db..299ff00 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -19,7 +19,8 @@ INCLUDES =					\
 	$(GDK_CFLAGS)				\
 	$(FREETYPE_CFLAGS)			\
 	$(FONTCONFIG_CFLAGS)                    \
-	$(cairo_includes)			
+	$(cairo_includes)			\
+	$(POPPLER_GLIB_DISABLE_DEPRECATED)
 
 stamp_files = stamp-poppler-enums.h
 
diff --git a/glib/demo/Makefile.am b/glib/demo/Makefile.am
index 0eb6455..41e071d 100644
--- a/glib/demo/Makefile.am
+++ b/glib/demo/Makefile.am
@@ -1,7 +1,9 @@
 INCLUDES = 					\
 	-I$(top_srcdir)/glib			\
 	-I$(top_builddir)/glib			\
-	$(GTK_TEST_CFLAGS)
+	$(GTK_TEST_CFLAGS)			\
+	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
+	-DGTK_DISABLE_DEPRECATED
 
 if BUILD_GTK_TEST
 noinst_PROGRAMS = poppler-glib-demo
diff --git a/glib/demo/attachments.c b/glib/demo/attachments.c
index 72754b2..d17835f 100644
--- a/glib/demo/attachments.c
+++ b/glib/demo/attachments.c
@@ -136,7 +136,7 @@ pgd_attachments_save_dialog_response (GtkFileChooser    *file_chooser,
 
 	filename = gtk_file_chooser_get_filename (file_chooser);
 	if (!poppler_attachment_save (attachment, filename, &error)) {
-		g_warning (error->message);
+		g_warning ("%s", error->message);
 		g_error_free (error);
 	}
 	g_free (filename);
@@ -201,7 +201,7 @@ message_dialog_run (GtkWindow   *parent,
 					 GTK_DIALOG_DESTROY_WITH_PARENT,
 					 GTK_MESSAGE_INFO,
 					 GTK_BUTTONS_CLOSE,
-					 message);
+					 "%s", message);
 	gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 }


More information about the poppler mailing list