[gnome-weather] City: use an icon instead of text for the back button



commit 62e07bb74111857c963af44c9644aacf77acb857
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Fri Dec 13 17:08:51 2013 +0100

    City: use an icon instead of text for the back button
    
    All other applications use an icon there, so be consistent.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720321

 data/window.ui |   12 ++++++++++--
 src/window.js  |    3 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/data/window.ui b/data/window.ui
index f2c1b6b..78d5855 100644
--- a/data/window.ui
+++ b/data/window.ui
@@ -76,11 +76,19 @@
       <object class="GtkButton" id="world-button">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="label" translatable="yes">World Weather</property>
+        <property name="action-name">win.go-world</property>
         <property name="valign">center</property>
         <style>
-          <class name="text-button"/>
+          <class name="image-button"/>
         </style>
+        <child>
+          <object class="GtkImage" id="world-button-image">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon-name">go-previous-symbolic</property>
+            <property name="icon-size">1</property>
+          </object>
+        </child>
       </object>
       <packing>
         <property name="pack_type">start</property>
diff --git a/src/window.js b/src/window.js
index 00b8944..2c74718 100644
--- a/src/window.js
+++ b/src/window.js
@@ -93,6 +93,8 @@ const MainWindow = new Lang.Class({
                             activate: this._setSelectionMode,
                             parameter_type: new GLib.VariantType('b'),
                             state: new GLib.Variant('b', false) },
+                          { name: 'go-world',
+                            activate: this._goWorld },
                           { name: 'select-all',
                             activate: this._selectAll },
                           { name: 'select-none',
@@ -116,7 +118,6 @@ const MainWindow = new Lang.Class({
         this._pageWidgets[Page.WORLD].push(newButton);
 
         let goWorldButton = builder.get_object('world-button');
-        goWorldButton.connect('clicked', Lang.bind(this, this._goWorld));
         this._pageWidgets[Page.CITY].push(goWorldButton);
 
         let select = builder.get_object('select-button');


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]