[gnome-weather] WorldView: we can set GdMainView:model directly



commit 4dc8f555ac0fd3f008a074f077981e04ecc1b8a0
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Apr 16 22:26:19 2013 +0200

    WorldView: we can set GdMainView:model directly
    
    No need for a separate parameter!

 src/world.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/world.js b/src/world.js
index dd38da2..94b9553 100644
--- a/src/world.js
+++ b/src/world.js
@@ -164,10 +164,9 @@ const WorldIconView = new Lang.Class({
     Name: 'WorldView',
     Extends: Gd.MainView,
 
-    _init: function(model, params) {
+    _init: function(params) {
         params = Params.fill(params, { view_type: Gd.MainViewType.ICON });
         this.parent(params);
-        this.model = model;
 
         this.connect('selection-mode-request', Lang.bind(this, function() {
             this.selection_mode = true;
@@ -185,7 +184,7 @@ const WorldContentView = new Lang.Class({
                                        halign: Gtk.Align.FILL, valign: Gtk.Align.FILL });
         this.parent(params);
 
-        this.iconView = new WorldIconView(model, { visible: true });
+        this.iconView = new WorldIconView({ model: model, visible: true });
 
         this._placeHolder = new Gtk.Grid({ halign: Gtk.Align.CENTER,
                                            valign: Gtk.Align.CENTER,


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