diff --git a/configure.ac b/configure.ac
index bc0e6a26..c3704951 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,16 @@ 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 eedb457b..75f2ab34 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -171,6 +171,19 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
{
dash_image.icon_name = "go-previous-symbolic";
}
+
+ // 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)
+ {
+ d_header_bar.remove(d_activities_switcher);
+ d_header_bar.remove(d_search_button);
+ d_header_bar.remove(d_gear_menu);
+
+ d_header_bar.pack_end(d_gear_menu);
+ d_header_bar.pack_end(d_search_button);
+ d_header_bar.pack_end(d_activities_switcher);
+ }
}
private void on_close_activated()
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index 647b6a25..23098b29 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -35,19 +35,20 @@
-
-