[frogr] Actually define GTK_API_VERSION_3 when compiling with GTK3



commit fd61d0b38e620f839b78ae77197d1b30e731a6c2
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Sat Apr 23 00:32:36 2011 +0200

    Actually define GTK_API_VERSION_3 when compiling with GTK3

 configure.ac     |    1 +
 src/Makefile.am  |    5 +++++
 src/frogr-util.c |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e5b62f2..4d8f34f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,7 @@ esac
 # Make GTK API version available to the code
 AC_SUBST([GTK_API_VERSION])
 AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
+AM_CONDITIONAL([GTK_API_VERSION_3],[test "$GTK_API_VERSION" = "3.0"])
 
 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
 FROGR_CFLAGS="$FROGR_CFLAGS $GTK_CFLAGS"
diff --git a/src/Makefile.am b/src/Makefile.am
index 383b874..613629e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,11 @@ frogr_CFLAGS += \
 	-DGTK_API_VERSION_2=1
 endif
 
+if GTK_API_VERSION_3
+frogr_CFLAGS += \
+	-DGTK_API_VERSION_3=1
+endif
+
 if !HAVE_MAC_INTEGRATION
 frogr_LDFLAGS = -export-dynamic
 endif
diff --git a/src/frogr-util.c b/src/frogr-util.c
index 0934040..643f09f 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -27,6 +27,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+#ifndef GTK_API_VERSION_3
 static gboolean frogr_util_spawn_command (const gchar* cmd)
 {
   GError *error = NULL;
@@ -42,6 +43,7 @@ static gboolean frogr_util_spawn_command (const gchar* cmd)
 
   return TRUE;
 }
+#endif
 
 void
 frogr_util_open_url_in_browser (const gchar *url)



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