[baobab/wip/grid-layout: 5/9] Tweak toolbar buttons in home page
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/grid-layout: 5/9] Tweak toolbar buttons in home page
- Date: Sun, 15 Apr 2012 13:27:42 +0000 (UTC)
commit f4972d2fc11d806a4a4d26e9962d36d47cd03829
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sun Apr 15 14:57:18 2012 +0200
Tweak toolbar buttons in home page
Center the buttons and fix the labels
src/baobab-main-window.ui | 10 +++++-----
src/baobab-window.vala | 5 +++++
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/baobab-main-window.ui b/src/baobab-main-window.ui
index f569bdf..828a14e 100644
--- a/src/baobab-main-window.ui
+++ b/src/baobab-main-window.ui
@@ -15,7 +15,7 @@
<child>
<object class="GtkButtonBox" id="scan-buttonbox">
<property name="visible">True</property>
- <property name="layout_style">start</property>
+ <property name="layout_style">center</property>
<style>
<class name="linked"/>
</style>
@@ -24,11 +24,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Scan a folder</property>
- <property name="tooltip_text" translatable="yes">Scan a folder</property>
+ <property name="tooltip_markup" translatable="yes">Scan a local folder</property>
+ <property name="tooltip_text" translatable="yes">Scan a local folder</property>
<property name="use_action_appearance">False</property>
<property name="action_name">win.scan-folder</property>
- <property name="label" translatable="yes">Scan Folder</property>
+ <property name="label" translatable="yes">Scan local folder</property>
<property name="use_underline">True</property>
<!--<property name="stock_id">gtk-directory</property>-->
</object>
@@ -42,7 +42,7 @@
<property name="tooltip_text" translatable="yes">Scan a remote folder</property>
<property name="use_action_appearance">False</property>
<property name="action_name">win.scan-remote</property>
- <property name="label" translatable="yes">Scan Remote Folder</property>
+ <property name="label" translatable="yes">Scan remote folder</property>
<property name="use_underline">True</property>
<!--<property name="stock_id">gtk-network</property>-->
</object>
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 552f193..d2887ce 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -27,6 +27,7 @@ namespace Baobab {
Gtk.Notebook main_notebook;
Gtk.Toolbar toolbar;
Gtk.ToolItem toolbar_home_toolitem;
+ Gtk.SeparatorToolItem toolbar_separator;
Gtk.ToolButton toolbar_show_home_page;
Gtk.ToolButton toolbar_rescan;
Gtk.InfoBar infobar;
@@ -118,6 +119,7 @@ namespace Baobab {
main_notebook = builder.get_object ("main-notebook") as Gtk.Notebook;
toolbar = builder.get_object ("toolbar") as Gtk.Toolbar;
toolbar_home_toolitem = builder.get_object ("home-page-toolitem") as Gtk.ToolItem;
+ toolbar_separator = builder.get_object ("separatortoolitem1") as Gtk.SeparatorToolItem;
toolbar_show_home_page = builder.get_object ("show-home-page-button") as Gtk.ToolButton;
toolbar_rescan = builder.get_object ("rescan-button") as Gtk.ToolButton;
infobar = builder.get_object ("infobar") as Gtk.InfoBar;
@@ -142,6 +144,8 @@ namespace Baobab {
// To make it draggable like a primary toolbar
toolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_MENUBAR);
+ toolbar_home_toolitem.set_expand (true);
+
ui_settings = Application.get_ui_settings ();
lookup_action ("active-chart").change_state (ui_settings.get_value ("active-chart"));
@@ -166,6 +170,7 @@ namespace Baobab {
void set_ui_page (UIPage page) {
toolbar_home_toolitem.visible = (page == UIPage.HOME);
+ toolbar_separator.visible = (page == UIPage.RESULT);
toolbar_show_home_page.visible = (page == UIPage.RESULT);
toolbar_rescan.visible = (page == UIPage.RESULT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]