[gnome-weather] Make use of the new GtkActionBar
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Make use of the new GtkActionBar
- Date: Thu, 13 Feb 2014 21:02:06 +0000 (UTC)
commit d0e29bbdf82ffbbc4e36650f344c0583ba353278
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Feb 13 21:49:41 2014 +0100
Make use of the new GtkActionBar
The old one was renamed to GtkCenterBox, and the new one has
a GtkRevealer built-in.
data/window.ui | 33 ++++++++++++++-------------------
src/window.js | 4 ++--
2 files changed, 16 insertions(+), 21 deletions(-)
---
diff --git a/data/window.ui b/data/window.ui
index e374305..a5a1318 100644
--- a/data/window.ui
+++ b/data/window.ui
@@ -193,30 +193,25 @@
</packing>
</child>
<child>
- <object class="GtkRevealer" id="selection-bar-revealer">
+ <object class="GtkActionBar" id="selection-bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no-show-all">True</property>
<child>
- <object class="GtkActionBar" id="selection-bar">
+ <object class="GtkButton" id="delete-button">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkButton" id="delete-button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Delete</property>
- <property name="action-name">win.delete-selected</property>
- <property name="valign">center</property>
- <style>
- <class name="text-button"/>
- </style>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Delete</property>
+ <property name="action-name">win.delete-selected</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="text-button"/>
+ </style>
</object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
</child>
</object>
<packing>
diff --git a/src/window.js b/src/window.js
index 2a21691..ae62929 100644
--- a/src/window.js
+++ b/src/window.js
@@ -140,7 +140,7 @@ const MainWindow = new Lang.Class({
let selectDone = builder.get_object('done-button');
this._pageWidgets[Page.WORLD].push(selectDone);
- let selectionBarRevealer = builder.get_object('selection-bar-revealer');
+ let selectionBar = builder.get_object('selection-bar');
let selectionMenu = builder.get_object("selection-menu");
this._selectionMenuButton = builder.get_object('selection-menu-button');
@@ -180,7 +180,7 @@ const MainWindow = new Lang.Class({
GObject.BindingFlags.INVERT_BOOLEAN);
iconView.bind_property('selection-mode', selectDone, 'visible',
GObject.BindingFlags.SYNC_CREATE);
- iconView.bind_property('selection-mode', selectionBarRevealer, 'reveal-child',
+ iconView.bind_property('selection-mode', selectionBar, 'visible',
GObject.BindingFlags.SYNC_CREATE);
this._worldView.bind_property('empty', this.lookup_action('selection-mode'), 'enabled',
GObject.BindingFlags.SYNC_CREATE |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]