[gitg] Check gtk with Gtk.check_version instead of configure check
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Check gtk with Gtk.check_version instead of configure check
- Date: Fri, 10 Jan 2014 11:55:02 +0000 (UTC)
commit 977a2fe3a6f5f55453e15df73a1f04a478e49cc8
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Jan 10 12:54:40 2014 +0100
Check gtk with Gtk.check_version instead of configure check
configure.ac | 10 ----------
gitg/gitg-window.vala | 2 +-
vapi/config.vapi | 4 ----
3 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2633eef..daf0ce5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,16 +107,6 @@ PKG_CHECK_MODULES(LIBGITG, [
json-glib-1.0
])
-dnl temporary check for 3.11 to switch header bar buttons. This check can
-dnl be removed when we bump the gtk+ requirement to 3.12
-PKG_CHECK_EXISTS(gtk+-3.0 >= 3.11,
- [GTK_VERSION_AT_LEAST_3_11=TRUE],
- [GTK_VERSION_AT_LEAST_3_11=FALSE])
-
-AC_DEFINE_UNQUOTED([GTK_VERSION_AT_LEAST_3_11],
- $GTK_VERSION_AT_LEAST_3_11,
- [Set if the gtk+ version is at least 3.11])
-
AC_MSG_CHECKING([for libgit2-glib threading support])
cflags_save="${CFLAGS}"
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 75f2ab3..b1041e6 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -174,7 +174,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
// temporary check for 3.11 to switch header bar buttons. This check can
// be removed when we bump the gtk+ requirement to 3.12
- if (Config.GTK_VERSION_AT_LEAST_3_11)
+ if (Gtk.check_version(3, 11, 0) == null)
{
d_header_bar.remove(d_activities_switcher);
d_header_bar.remove(d_search_button);
diff --git a/vapi/config.vapi b/vapi/config.vapi
index c69264b..fa2dd34 100644
--- a/vapi/config.vapi
+++ b/vapi/config.vapi
@@ -9,10 +9,6 @@ namespace Gitg.Config
public const string GITG_LOCALEDIR;
public const string GITG_LIBDIR;
public const string VERSION;
-
- // temporary check for 3.11 to switch header bar buttons. This check can
- // be removed when we bump the gtk+ requirement to 3.12
- public const bool GTK_VERSION_AT_LEAST_3_11;
}
// ex:ts=4 noet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]