[gnome-weather] Revert "Add a preference dialog for configuring units of measure"



commit 01987221924c0c6229b6da82d039a9a329196730
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon May 13 22:54:32 2013 +0200

    Revert "Add a preference dialog for configuring units of measure"
    
    This reverts commit 2a7415ac1306d1390560e3fbcdd1f6376ef0affb.
    
    Yeah, it was a very powerful dialog, and it was an example
    of good code and good usage of Glade. But it was nothing
    near good UI design.
    
    Conflicts:
        data/gnome-weather.gresource.xml
        src/window.js

 data/app-menu.ui                 |    4 -
 data/gnome-weather.gresource.xml |    1 -
 data/preferences.ui              |  297 --------------------------------------
 src/window.js                    |   28 +----
 4 files changed, 1 insertions(+), 329 deletions(-)
---
diff --git a/data/app-menu.ui b/data/app-menu.ui
index 725bf2e..42a16a4 100644
--- a/data/app-menu.ui
+++ b/data/app-menu.ui
@@ -7,10 +7,6 @@
         <attribute name="accel">&lt;Primary&gt;n</attribute>
       </item>
       <item>
-        <attribute name="label" translatable="yes">_Preferences</attribute>
-        <attribute name="action">win.preferences</attribute>
-      </item>
-      <item>
         <attribute name="action">win.about</attribute>
         <attribute name="label" translatable="yes">About Weather</attribute>
       </item>
diff --git a/data/gnome-weather.gresource.xml b/data/gnome-weather.gresource.xml
index 4fdc02b..9c7d670 100644
--- a/data/gnome-weather.gresource.xml
+++ b/data/gnome-weather.gresource.xml
@@ -5,7 +5,6 @@
     <file preprocess="xml-stripblanks">window.ui</file>
     <file preprocess="xml-stripblanks">new-location-dialog.ui</file>
     <file preprocess="xml-stripblanks">city.ui</file>
-    <file preprocess="xml-stripblanks">preferences.ui</file>
     <file>application.css</file>
     <file>weather-clear.jpg</file>
     <file>weather-clear-night.jpg</file>
diff --git a/src/window.js b/src/window.js
index 6c12ae2..2a1ee5c 100644
--- a/src/window.js
+++ b/src/window.js
@@ -46,8 +46,6 @@ const MainWindow = new Lang.Class({
         Util.initActions(this,
                          [{ name: 'new',
                             activate: this._newLocation },
-                          { name: 'preferences',
-                            activate: this._showPreferences },
                           { name: 'about',
                             activate: this._showAbout },
                           { name: 'new-location',
@@ -292,30 +290,6 @@ const MainWindow = new Lang.Class({
         });
     },
 
-    _showPreferences: function() {
-        let builder = new Gtk.Builder();
-        builder.add_from_resource('/org/gnome/weather/preferences.ui');
-
-        let dialog = builder.get_object('preferences-dialog');
-        dialog.transient_for = this;
-
-        let settings = new Gio.Settings({ schema: 'org.gnome.GWeather' });
-        settings.bind('temperature-unit', builder.get_object('temp-combo'), 'active-id',
-                      Gio.SettingsBindFlags.DEFAULT);
-        settings.bind('speed-unit', builder.get_object('speed-combo'), 'active-id',
-                      Gio.SettingsBindFlags.DEFAULT);
-        settings.bind('distance-unit', builder.get_object('distance-combo'), 'active-id',
-                      Gio.SettingsBindFlags.DEFAULT);
-        settings.bind('pressure-unit', builder.get_object('pressure-combo'), 'active-id',
-                      Gio.SettingsBindFlags.DEFAULT);
-
-        dialog.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE);
-        dialog.set_default_response(Gtk.ResponseType.CLOSE);
-        dialog.connect('response', function(d) { d.destroy(); });
-
-        dialog.show();
-    },
-
     _deleteSelected: function() {
         let items = this._worldView.iconView.get_selection();
         let model = this._worldView.iconView.model;
@@ -327,5 +301,5 @@ const MainWindow = new Lang.Class({
         }
 
         this._exitSelectionMode();
-    },
+    }
 });


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