[gnote] * Check for Gtk+ 2.14 or later and include gtk/gtk.h in src/utils.cpp



commit f242d5e64cfff63e4d9d8e023684215613bef647
Author: Hubert Figuiere <hub figuiere net>
Date:   Thu Apr 16 23:39:48 2009 -0400

      * Check for Gtk+ 2.14 or later and include gtk/gtk.h in src/utils.cpp
        (Close #579240)
---
 NEWS            |    2 ++
 configure.ac    |    6 +++++-
 src/Makefile.am |    4 ++--
 src/utils.cpp   |    2 ++
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 4f2f2e7..b7f2bb9 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ Fixes:
 
   * Can now close the template note opened when the Preferences
     dialog is open. (Close #579105)
+  * Check for Gtk+ 2.14 or later and include gtk/gtk.h in src/utils.cpp
+    (Close #579240)
 
 Translations:
 
diff --git a/configure.ac b/configure.ac
index 52baa2a..e04253e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,10 @@ AC_SUBST(GNOTE_VERSION)
 
 dnl all the library version.
 dnl if one is harcoded elsewhere, it is a bug
+
+dnl 2.14 needed for gtk_show_uri(). Possibly replacable by gnomevfs or what not
+dnl to backport.
+GTK_VERSION=2.14
 LIBGLIBMM_VERSION=2.0
 LIBGTKMM_VERSION=2.12.0
 dnl LIBGLADEMM_VERSION=2.6.0
@@ -63,7 +67,7 @@ AC_LANG_CPLUSPLUS
 AC_LANG_COMPILER_REQUIRE
 
 PKG_CHECK_MODULES(LIBGLIBMM, [glibmm-2.4])
-PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= $GTK_VERSION])
 PKG_CHECK_MODULES(LIBGTKMM, [gtkmm-2.4 >= $LIBGTKMM_VERSION])
 PKG_CHECK_MODULES(LIBXMLPP, [libxml++-2.6])
 PKG_CHECK_MODULES(GCONF, [gconf-2.0])
diff --git a/src/Makefile.am b/src/Makefile.am
index 3c770eb..551ae4a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,13 +3,13 @@
 
 INCLUDES = -I$(top_srcdir)
 AM_CPPFLAGS= LIBGTKMM_CFLAGS@ @LIBGLIBMM_CFLAGS@ \
-	@LIBXMLPP_CFLAGS@ @GCONF_CFLAGS@ \
+	@LIBXMLPP_CFLAGS@ @GCONF_CFLAGS@ @GTK_CFLAGS@ \
 	@GTKSPELL_CFLAGS@ \
 	-DDATADIR=\"$(datadir)\"
 
 GNOTE_LIBS = @LIBGLIBMM_LIBS@ @LIBGTKMM_LIBS@ @LIBXMLPP_LIBS@ \
 	@GCONF_LIBS@ @BOOST_FILESYSTEM_LIBS@ @BOOST_REGEX_LIBS@ \
-	@GTKSPELL_LIBS@ libgnote.a \
+	@GTKSPELL_LIBS@ @GTK_LIBS@ libgnote.a \
 	-luuid -L$(top_builddir)/libtomboy -ltomboy
 
 noinst_LIBRARIES = libgnote.a
diff --git a/src/utils.cpp b/src/utils.cpp
index e8d5223..b976b4b 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -25,6 +25,8 @@
 #include <boost/format.hpp>
 #include <boost/bind.hpp>
 
+#include <gtk/gtk.h>
+
 #include <glibmm/i18n.h>
 #include <gtkmm/icontheme.h>
 #include <gtkmm/image.h>



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