[gitg] Use titlebar at GtkHeaderBar
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Use titlebar at GtkHeaderBar
- Date: Tue, 28 May 2013 12:18:28 +0000 (UTC)
commit c513c35eb92d94fc5a4195e72bbed2fe33e6bf9a
Author: Jose Manuel Pintor Freire <jmpintorfreire gmail com>
Date: Mon May 20 13:55:10 2013 +0200
Use titlebar at GtkHeaderBar
Signed-off-by: Ignacio Casal Quinteiro <icq gnome org>
gitg/gitg-window.vala | 4 +-
gitg/resources/ui/gitg-window.ui | 91 +++++++++++++++++--------------------
2 files changed, 44 insertions(+), 51 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index af7d1b0..f2f3240 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -34,7 +34,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
// Widgets
- private Gd.HeaderBar d_header_bar;
+ private Gtk.HeaderBar d_header_bar;
private Gtk.MenuButton d_gear_menu;
private MenuModel d_dash_model;
private MenuModel d_views_model;
@@ -417,7 +417,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
private void parser_finished(Gtk.Builder builder)
{
// Extract widgets from the builder
- d_header_bar = builder.get_object("header-bar") as Gd.HeaderBar;
+ d_header_bar = builder.get_object("header-bar") as Gtk.HeaderBar;
d_button_dash = builder.get_object("button_dash") as Gd.HeaderSimpleButton;
d_button_dash.clicked.connect((b) => {
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index aa3a64b..f360339 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -8,65 +8,58 @@
<property name="title" translatable="yes">gitg</property>
<property name="default_width">1000</property>
<property name="default_height">600</property>
- <property name="hide_titlebar_when_maximized">True</property>
- <child>
- <object class="GtkGrid" id="grid1">
+ <child type="titlebar">
+ <object class="GtkHeaderBar" id="header-bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="vexpand">False</property>
+ <child>
+ <object class="GdHeaderSimpleButton" id="button_dash">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="symbolic_icon_name">go-previous-symbolic</property>
+ </object>
+ <packing>
+ <property name="pack_type">start</property>
+ </packing>
+ </child>
<child>
- <object class="GdHeaderBar" id="header-bar">
+ <object class="GdHeaderToggleButton" id="search-button">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="vexpand">False</property>
- <child>
- <object class="GdHeaderSimpleButton" id="button_dash">
- <property name="visible">False</property>
- <property name="can_focus">False</property>
- <property name="symbolic_icon_name">go-previous-symbolic</property>
- </object>
- <packing>
- <property name="pack_type">start</property>
- </packing>
- </child>
- <child>
- <object class="GdHeaderToggleButton" id="search-button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="symbolic_icon_name">edit-find-symbolic</property>
- <property name="action_name">win.search</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
- <child>
- <object class="GdStackSwitcher" id="commit-view-switcher">
- <property name="visible">False</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
- <child>
- <object class="GdHeaderMenuButton" id="gear-menubutton">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="symbolic_icon_name">emblem-system-symbolic</property>
- <property name="action_name">win.gear-menu</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
+ <property name="symbolic_icon_name">edit-find-symbolic</property>
+ <property name="action_name">win.search</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="pack_type">end</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GdStackSwitcher" id="commit-view-switcher">
+ <property name="visible">False</property>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
</packing>
</child>
<child>
+ <object class="GdHeaderMenuButton" id="gear-menubutton">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="symbolic_icon_name">emblem-system-symbolic</property>
+ <property name="action_name">win.gear-menu</property>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
<object class="GdRevealer" id="search-revealer">
<property name="visible">True</property>
<property name="can_focus">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]