[gnome-shell] wanda: fix a refactor fallout



commit 056cfc9dc63d1090b666d9423e16e52db514d3a4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Nov 27 12:12:44 2012 -0500

    wanda: fix a refactor fallout
    
    load_sliced_image() would need an additional parameter, but fold the
    notify::mapped callback into the load callback while we're at it.

 js/ui/wanda.js |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/wanda.js b/js/ui/wanda.js
index 31b940d..2852233 100644
--- a/js/ui/wanda.js
+++ b/js/ui/wanda.js
@@ -53,18 +53,19 @@ const WandaIcon = new Lang.Class({
                                  icon_size: iconSize });
         }
 
-        this._animations = St.TextureCache.get_default().load_sliced_image(this._imageFile, this._imgWidth, this._imgHeight);
-        this._animations.connect('notify::mapped', Lang.bind(this, function() {
-            if (this._animations.mapped && !this._timeoutId) {
-                this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, FISH_SPEED, Lang.bind(this, this._update));
-
-                this._i = 0;
-                this._update();
-            } else if (!this._animations.mapped && this._timeoutId) {
-                GLib.source_remove(this._timeoutId);
-                this._timeoutId = 0;
-            }
-        }));
+        this._animations = St.TextureCache.get_default().load_sliced_image(this._imageFile,
+            this._imgWidth, this._imgHeight, Lang.bind(this,
+                function() {
+                    if (this._animations.mapped && !this._timeoutId) {
+                        this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, FISH_SPEED, Lang.bind(this, this._update));
+
+                        this._i = 0;
+                        this._update();
+                    } else if (!this._animations.mapped && this._timeoutId) {
+                        GLib.source_remove(this._timeoutId);
+                        this._timeoutId = 0;
+                    }
+                }));
 
         return this._animations;
     },



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