summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2015-09-28 20:54:34 +0200
committerChristian Persch <chpe@gnome.org>2015-09-28 20:54:34 +0200
commit9ca7b21abd4a4d4d65f3edcdb2476aca067773c1 (patch)
tree4cda362bd50ef2f08ac23faa05bb0ebdd380b541
parent4e636acd3434ce0a2111e492d7d74aaba1020323 (diff)
downloadvte-9ca7b21abd4a4d4d65f3edcdb2476aca067773c1.tar.gz
vteapp: Fix build with gtk+ < 3.16
https://bugzilla.gnome.org/show_bug.cgi?id=755650
-rw-r--r--configure.ac7
-rw-r--r--src/Makefile.am4
-rw-r--r--src/app.vala2
3 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 213060a2..ee34914b 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 27909df6..4bbff1ec 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 25279609..e6ee9342 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); });