[baobab/wip/vala: 55/65] Move "Scan folder" and "Scan network folder" back to the toolbar
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/vala: 55/65] Move "Scan folder" and "Scan network folder" back to the toolbar
- Date: Thu, 5 Apr 2012 12:19:35 +0000 (UTC)
commit 155df5a67126363c5b6dc040bc3da94d5565445a
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sun Apr 1 20:41:04 2012 +0200
Move "Scan folder" and "Scan network folder" back to the toolbar
src/baobab-main-window.ui | 85 ++++++++++++++++++++++++---------------------
src/baobab-window.vala | 14 +++++++-
2 files changed, 58 insertions(+), 41 deletions(-)
---
diff --git a/src/baobab-main-window.ui b/src/baobab-main-window.ui
index 77c9866..84be86e 100644
--- a/src/baobab-main-window.ui
+++ b/src/baobab-main-window.ui
@@ -10,6 +10,50 @@
<property name="can_focus">False</property>
<property name="show_arrow">False</property>
<child>
+ <object class="GtkToolItem" id="scan-folder-toolitem">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButtonBox" id="scan-buttonbox">
+ <property name="visible">True</property>
+ <property name="layout_style">start</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="scan-folder-button">
+ <property name="use_action_appearance">False</property>
+ <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="use_action_appearance">False</property>
+ <property name="action_name">win.scan-folder</property>
+ <property name="label" translatable="yes">Scan Folder</property>
+ <property name="use_underline">True</property>
+ <!--<property name="stock_id">gtk-directory</property>-->
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="scan-remote-button">
+ <property name="use_action_appearance">False</property>
+ <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 remote folder</property>
+ <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="use_underline">True</property>
+ <!--<property name="stock_id">gtk-network</property>-->
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="GtkToolButton" id="show-home-page-button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -155,46 +199,7 @@
</child>
</object>
</child>
- <child>
- <object class="GtkButtonBox" id="scan-buttonbox">
- <property name="visible">True</property>
- <property name="layout_style">start</property>
- <style>
- <class name="linked"/>
- </style>
- <child>
- <object class="GtkButton" id="scan-folder-button">
- <property name="use_action_appearance">False</property>
- <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="use_action_appearance">False</property>
- <property name="action_name">win.scan-folder</property>
- <property name="label" translatable="yes">Scan Folder</property>
- <property name="use_underline">True</property>
- <!--<property name="stock_id">gtk-directory</property>-->
- </object>
- </child>
- <child>
- <object class="GtkButton" id="scan-remote-button">
- <property name="use_action_appearance">False</property>
- <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 remote folder</property>
- <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="use_underline">True</property>
- <!--<property name="stock_id">gtk-network</property>-->
- </object>
- </child>
- </object>
- </child>
- </object>
+ </object>
</child>
<child>
<object class="GtkGrid" id="result-page">
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 7a39941..27789cd 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -3,6 +3,10 @@ namespace Baobab {
Settings ui_settings;
Gtk.Notebook main_notebook;
Gtk.Toolbar toolbar;
+ Gtk.ToolItem toolbar_scan_toolitem;
+ Gtk.ToolButton toolbar_show_home_page;
+ Gtk.ToolButton toolbar_stop;
+ Gtk.ToolButton toolbar_rescan;
Gtk.InfoBar infobar;
Gtk.Label infobar_primary;
Gtk.Label infobar_secondary;
@@ -89,6 +93,10 @@ namespace Baobab {
// Cache some objects from the builder.
main_notebook = builder.get_object ("main-notebook") as Gtk.Notebook;
toolbar = builder.get_object ("toolbar") as Gtk.Toolbar;
+ toolbar_scan_toolitem = builder.get_object ("scan-folder-toolitem") as Gtk.ToolItem;
+ toolbar_show_home_page = builder.get_object ("show-home-page-button") as Gtk.ToolButton;
+ toolbar_stop = builder.get_object ("stop-button") as Gtk.ToolButton;
+ toolbar_rescan = builder.get_object ("rescan-button") as Gtk.ToolButton;
infobar = builder.get_object ("infobar") as Gtk.InfoBar;
infobar_primary = builder.get_object ("infobar-primary-label") as Gtk.Label;
infobar_secondary = builder.get_object ("infobar-secondary-label") as Gtk.Label;
@@ -127,7 +135,11 @@ namespace Baobab {
}
void set_ui_page (UIPage page) {
- toolbar.visible = (page == UIPage.RESULT);
+ toolbar_scan_toolitem.visible = (page == UIPage.HOME);
+ toolbar_show_home_page.visible = (page == UIPage.RESULT);
+ toolbar_stop.visible = (page == UIPage.RESULT);
+ toolbar_rescan.visible = (page == UIPage.RESULT);
+
main_notebook.page = page;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]