mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-28 12:30:06 +00:00
Fix back-portable header bar positions
This reverts dbb2e0feb0
and adds a
temporary fix for gtk+ >= 3.11. This commit can be reverted once we
bump our gtk+ requirement to 3.12.
This commit is contained in:
parent
9cbc47296f
commit
1ea17027e3
10
configure.ac
10
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}"
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -35,19 +35,20 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="d_gear_menu">
|
||||
<object class="GtkToggleButton" id="d_search_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">win.gear-menu</property>
|
||||
<property name="action_name">win.search</property>
|
||||
<signal name="toggled" handler="search_button_toggled" swapped="no"/>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="gear_image">
|
||||
<object class="GtkImage" id="search_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="icon_name">emblem-system-symbolic</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -64,20 +65,19 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="d_search_button">
|
||||
<object class="GtkMenuButton" id="d_gear_menu">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">win.search</property>
|
||||
<signal name="toggled" handler="search_button_toggled" swapped="no"/>
|
||||
<property name="action_name">win.gear-menu</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="search_image">
|
||||
<object class="GtkImage" id="gear_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
<property name="icon_name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -9,6 +9,10 @@ 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
|
||||
|
|
Loading…
Reference in a new issue