[gnome-boxes] Revert "selectionbar: Remove properties button"
- From: Lasse Schuirmann <lschuirma src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Revert "selectionbar: Remove properties button"
- Date: Wed, 4 Mar 2015 17:37:14 +0000 (UTC)
commit 6022accb5d3a572f44658ab0ece8a143d8982579
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date: Wed Mar 4 18:36:27 2015 +0100
Revert "selectionbar: Remove properties button"
Accidentally committed during UI freeze.
This reverts commit eb92a0c5b64d2fb6a93d7531756c6a47c44a9772.
data/ui/selectionbar.ui | 18 ++++++++++++++++++
src/selectionbar.vala | 14 ++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/selectionbar.ui b/data/ui/selectionbar.ui
index 550dc70..cff9a92 100644
--- a/data/ui/selectionbar.ui
+++ b/data/ui/selectionbar.ui
@@ -81,6 +81,24 @@
</packing>
</child>
+ <!-- Properties button -->
+ <child>
+ <object class="GtkButton" id="properties_btn">
+ <property name="visible">True</property>
+ <property name="valign">center</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_Properties</property>
+ <signal name="clicked" handler="on_properties_btn_clicked"/>
+ <style>
+ <class name="text-button"/>
+ </style>
+ </object>
+
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
+
</object>
</child>
</template>
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index 2832006..583b84d 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -10,6 +10,8 @@ private class Boxes.Selectionbar: Gtk.Revealer {
[GtkChild]
private Gtk.Button remove_btn;
[GtkChild]
+ private Gtk.Button properties_btn;
+ [GtkChild]
private Gtk.Button open_btn;
private AppWindow window;
@@ -17,6 +19,7 @@ private class Boxes.Selectionbar: Gtk.Revealer {
construct {
App.app.notify["selected-items"].connect (() => {
update_favorite_btn ();
+ update_properties_btn ();
update_pause_btn ();
update_delete_btn ();
update_open_btn ();
@@ -76,6 +79,11 @@ private class Boxes.Selectionbar: Gtk.Revealer {
App.app.remove_selected_items ();
}
+ [GtkCallback]
+ private void on_properties_btn_clicked () {
+ window.show_properties ();
+ }
+
private void update_favorite_btn () {
var active = false;
var sensitive = App.app.selected_items.length () > 0;
@@ -100,6 +108,12 @@ private class Boxes.Selectionbar: Gtk.Revealer {
ignore_favorite_btn_clicks = false;
}
+ private void update_properties_btn () {
+ var sensitive = App.app.selected_items.length () == 1;
+
+ properties_btn.sensitive = sensitive;
+ }
+
private void update_pause_btn () {
var sensitive = false;
foreach (var item in App.app.selected_items) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]