[vte] vteapp: Fix build with gtk+ < 3.16
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] vteapp: Fix build with gtk+ < 3.16
- Date: Mon, 28 Sep 2015 18:55:37 +0000 (UTC)
commit 9ca7b21abd4a4d4d65f3edcdb2476aca067773c1
Author: Christian Persch <chpe gnome org>
Date: Mon Sep 28 20:54:34 2015 +0200
vteapp: Fix build with gtk+ < 3.16
https://bugzilla.gnome.org/show_bug.cgi?id=755650
configure.ac | 7 +++++++
src/Makefile.am | 4 ++++
src/app.vala | 2 ++
3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 213060a..ee34914 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,7 +329,14 @@ AM_PROG_VALAC([0.18.0],[],[
AC_MSG_ERROR([vala support enabled by vala compiler not found])
fi])
+if test "$enable_test_application" = "yes"; then
+ PKG_CHECK_MODULES([GTK_3_16],[gtk+-3.0 >= 3.16],[have_gtk_3_16=yes],[have_gtk_3_16=no])
+else
+ have_gtk_3_16=no
+fi
+
AM_CONDITIONAL([ENABLE_TEST_APPLICATION],[test "$enable_test_application" = "yes"])
+AM_CONDITIONAL([HAVE_GTK_3_16],[test "$have_gtk_3_16" = "yes"])
# ***************
# Auxiliary tools
diff --git a/src/Makefile.am b/src/Makefile.am
index 27909df..4bbff1e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -302,6 +302,10 @@ vte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_LDADD = \
$(VTE_LIBS) \
$(NULL)
+if HAVE_GTK_3_16
+vte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_VALAFLAGS += -D GTK_3_16
+endif
+
CLEANFILES += \
app.c \
appresources.c \
diff --git a/src/app.vala b/src/app.vala
index 2527960..e6ee934 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -46,8 +46,10 @@ class SearchPopover : Gtk.Popover
close_button.clicked.connect(() => { hide(); });
reveal_button.bind_property("active", revealer, "reveal-child");
+#if GTK_3_16
search_entry.next_match.connect(() => { search(false); });
search_entry.previous_match.connect(() => { search(true); });
+#endif
search_entry.search_changed.connect(() => { update_regex(); });
search_next_button.clicked.connect(() => { search(false); });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]