[gnome-color-manager] Revert "Allow building against gtk-2.0 rather than gtk-3.0"



commit be198a0cc15d532f70bc220282a8aaabc8288613
Author: Richard Hughes <richard hughsie com>
Date:   Thu Sep 30 17:10:03 2010 +0100

    Revert "Allow building against gtk-2.0 rather than gtk-3.0"
    
    This reverts commit 34b2a311e37618f902b54fdb5b67be1e3a2c05f9.

 configure.ac               |   32 +++++---------------------------
 libcolor-glib/gcm-compat.h |   10 ----------
 src/gcm-picker.c           |    1 -
 src/gcm-viewer.c           |    1 -
 4 files changed, 5 insertions(+), 39 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b4e3f86..7b466b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,37 +131,12 @@ AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
 AM_GLIB_GNU_GETTEXT
 GLIB_GSETTINGS
 
-dnl **** We can compile against GTK2 or GTK3 ****
-AC_MSG_CHECKING([which gtk+ version to compile against])
-AC_ARG_WITH([gtk],
-  [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 3.0)])],
-  [case "$with_gtk" in
-     2.0|3.0) ;;
-     *) AC_MSG_ERROR([invalid gtk version specified]) ;;
-   esac],
-  [with_gtk=3.0])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
-2.0)
-	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.21.5)
-	PKG_CHECK_MODULES(VTE, vte >= 0.25.1, has_vte=yes, has_vte=no)
-	PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.4.0, has_libnotify=yes, has_libnotify=no)
-	PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk >= 0.10)
-	;;
-3.0)
-	PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.90.3)
-	PKG_CHECK_MODULES(VTE, vte-2.90 >= 0.25.1, has_vte=yes, has_vte=no)
-	PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.5.0, has_libnotify=yes, has_libnotify=no)
-	PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= 0.10)
-       ;;
-esac
-
 dnl ---------------------------------------------------------------------------
 dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9)
 PKG_CHECK_MODULES(XORG, xrandr)
+PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.90.3)
 PKG_CHECK_MODULES(GUDEV, gudev-1.0)
 PKG_CHECK_MODULES(LCMS, lcms2)
 PKG_CHECK_MODULES(X11, x11)
@@ -180,12 +155,14 @@ PANELS_DIR="${libdir}/control-center-1/panels"
 AC_SUBST(PANELS_DIR)
 
 dnl **** Check for VTE ****
+PKG_CHECK_MODULES(VTE, vte-2.90 >= 0.25.1, has_vte=yes, has_vte=no)
 AM_CONDITIONAL(HAVE_VTE, test x$has_vte = xyes)
 if test x$has_vte = xyes; then
 	AC_DEFINE(HAVE_VTE,1,[Use VTE terminal widget])
 fi
 
 dnl **** Check for NOTIFY ****
+PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.5.0, has_libnotify=yes, has_libnotify=no)
 AM_CONDITIONAL(HAVE_NOTIFY, test x$libnotify = xyes)
 if test x$has_libnotify = xyes; then
 	AC_DEFINE(HAVE_NOTIFY,1,[Use session notifications])
@@ -223,6 +200,8 @@ if test x$enable_exiv = xyes; then
 	AC_DEFINE(HAVE_EXIV,1,[Use EXIV support for detecting scanners])
 fi
 
+PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= 0.10)
+
 PKG_CHECK_MODULES(EXIF, libexif)
 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
 	     TIFF_CFLAGS=""
@@ -362,7 +341,6 @@ echo "
         compiler:                  ${CC}
         cflags:                    ${CFLAGS}
         cppflags:                  ${CPPFLAGS}
-        GTK version:               ${with_gtk}
         PackageKit integration:    ${enable_packagekit}
         SANE support:              ${enable_sane}
         RAW support:               ${enable_exiv}
diff --git a/libcolor-glib/gcm-compat.h b/libcolor-glib/gcm-compat.h
index 0e11979..3e30993 100644
--- a/libcolor-glib/gcm-compat.h
+++ b/libcolor-glib/gcm-compat.h
@@ -26,7 +26,6 @@
 #ifndef __GCM_COMPAT_H__
 #define __GCM_COMPAT_H__
 
-#include <gtk/gtk.h>
 #include "config.h"
 
 /* only libusb 1.0.8 has libusb_strerror */
@@ -34,14 +33,5 @@
 #define	libusb_strerror(f1)				"unknown"
 #endif
 
-/* GtkApplication is missing */
-#if (!GTK_CHECK_VERSION(2,21,6))
-#define GtkApplication					GObject
-#define gtk_application_quit(f1)			g_assert(f1!=NULL)
-#define gtk_application_run(f1)				g_assert(f1!=NULL)
-#define gtk_application_add_window(f1,f2)		g_assert(f1!=NULL)
-#define gtk_application_new(f1,f2,f3)			g_object_new(G_TYPE_OBJECT, NULL)
-#endif
-
 #endif /* __GCM_COMPAT_H__ */
 
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index e56b62c..b223c29 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -29,7 +29,6 @@
 #include <locale.h>
 #include <gtk/gtk.h>
 #include <lcms2.h>
-#include <libcolor-glib.h>
 
 #include "egg-debug.h"
 
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 3fa26de..8496adb 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -26,7 +26,6 @@
 #include <glib/gstdio.h>
 #include <locale.h>
 #include <canberra-gtk.h>
-#include <libcolor-glib.h>
 
 #include "egg-debug.h"
 



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