From f2aa4cd5009a2766674ae02d2cc4f5e4fddb4079 Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 13 Dec 2016 11:32:51 +0300 Subject: move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option --- Makefile.am | 3 +-- configure.ac | 24 ++---------------------- libmateweather/mateweather-uninstalled.pc.in | 2 +- libmateweather/mateweather.pc.in | 2 +- libmateweather/test_locations.c | 4 ---- 5 files changed, 5 insertions(+), 30 deletions(-) diff --git a/Makefile.am b/Makefile.am index 325b0a7..f836421 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,8 +4,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} DISTCHECK_CONFIGURE_FLAGS = \ --enable-gtk-doc \ - --disable-icon-update \ - --with-gtk=$(GTK_API_VERSION) + --disable-icon-update EXTRA_DIST = \ autogen.sh diff --git a/configure.ac b/configure.ac index 9bcb32e..81d1500 100644 --- a/configure.ac +++ b/configure.ac @@ -21,27 +21,8 @@ AC_SUBST(LT_VERSION) AC_CANONICAL_HOST -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: 2.0)])], - [case "$with_gtk" in - 2.0|3.0) ;; - *) AC_MSG_ERROR([invalid gtk version specified]) ;; - esac], - [with_gtk=2.0]) -AC_MSG_RESULT([$with_gtk]) - -case "$with_gtk" in - 2.0) GTK_API_VERSION=2.0 - GTK_REQUIRED=2.24.0 - ;; - 3.0) GTK_API_VERSION=3.0 - GTK_REQUIRED=3.0.0 - ;; -esac -AC_SUBST(GTK_API_VERSION) - GLIB_REQUIRED=2.36.0 +GTK_REQUIRED=3.14.0 LIBSOUP_REQUIRED=2.34.0 GIO_REQUIRED=2.25.0 LIBXML_REQUIRED=2.6.0 @@ -80,7 +61,7 @@ AC_SUBST(COMPRESS_EXT) MATE_COMPILE_WARNINGS([maximum]) dnl -- Check for GTK+ (required) ------------------------------------------ -PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED) +PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED) dnl -- Check for libxml (required) ------------------------------------------ PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED) @@ -216,5 +197,4 @@ libmateweather-$VERSION configure summary: Compiler: ${CC} Locations.xml translations: ${LOCATIONS_XML_TRANSLATIONS} Locations.xml compression: ${enable_locations_compression} - Gtk+ version: ${GTK_API_VERSION} " >&2 diff --git a/libmateweather/mateweather-uninstalled.pc.in b/libmateweather/mateweather-uninstalled.pc.in index daf8604..03e7461 100644 --- a/libmateweather/mateweather-uninstalled.pc.in +++ b/libmateweather/mateweather-uninstalled.pc.in @@ -7,7 +7,7 @@ includedir=@includedir@ Name: MateWeather Description: MateWeather shared library Version: @VERSION@ -Requires: glib-2.0 gobject-2.0 gdk-pixbuf-2.0 gtk+-@GTK_API_VERSION@ gio-2.0 +Requires: glib-2.0 gobject-2.0 gdk-pixbuf-2.0 gtk+-3.0 gio-2.0 Requires.private: libxml-2.0 libsoup-2.4 Libs: ${pc_top_builddir}/${pcfiledir}/libmateweather.la Cflags: -I${pc_top_builddir}/${pcfiledir}/.. diff --git a/libmateweather/mateweather.pc.in b/libmateweather/mateweather.pc.in index 785975a..a617c33 100644 --- a/libmateweather/mateweather.pc.in +++ b/libmateweather/mateweather.pc.in @@ -7,7 +7,7 @@ includedir=@includedir@ Name: MateWeather Description: MateWeather shared library Version: @VERSION@ -Requires: glib-2.0 gobject-2.0 gdk-pixbuf-2.0 gtk+-@GTK_API_VERSION@ gio-2.0 +Requires: glib-2.0 gobject-2.0 gdk-pixbuf-2.0 gtk+-3.0 gio-2.0 Requires.private: libxml-2.0 libsoup-2.4 Libs: -L${libdir} -lmateweather Libs.private: -lm diff --git a/libmateweather/test_locations.c b/libmateweather/test_locations.c index 7a11ad7..af1ad90 100644 --- a/libmateweather/test_locations.c +++ b/libmateweather/test_locations.c @@ -43,11 +43,7 @@ main (int argc, char **argv) g_signal_connect (window, "delete-event", G_CALLBACK (deleted), NULL); -#if GTK_CHECK_VERSION (3, 0, 0) vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); -#else - vbox = gtk_vbox_new (FALSE, 8); -#endif gtk_container_add (GTK_CONTAINER (window), vbox); loc = mateweather_location_new_world (FALSE); -- cgit v1.2.1