[gnome-documents] embed: start/stop the spinner when fading it in and out



commit a46d93d4bafa2bc9ac51eee8d5b92bee2c677218
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Sep 24 12:26:31 2012 -0400

    embed: start/stop the spinner when fading it in and out
    
    Or it will keep the animation up in the background, keeping the CPU very
    busy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684726

 src/embed.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index e348b2e..46f4b97 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -68,7 +68,6 @@ const SpinnerBox = new Lang.Class({
                                           height_request: _ICON_SIZE,
                                           halign: Gtk.Align.CENTER,
                                           valign: Gtk.Align.CENTER });
-        this._spinner.start();
         this.widget.add(this._spinner);
 
         this._label = new Gtk.Label({ label: '<big><b>' + _("Loading...") + '</b></big>',
@@ -94,6 +93,8 @@ const SpinnerBox = new Lang.Class({
         let parent = this.actor.get_parent();
         parent.set_child_above_sibling(this.actor, null);
 
+        this._spinner.start();
+
         Tweener.addTween(this.actor, { opacity: 255,
                                        time: 0.30,
                                        transition: 'easeOutQuad' });
@@ -108,6 +109,8 @@ const SpinnerBox = new Lang.Class({
                                        onComplete: function () {
                                            let parent = this.actor.get_parent();
                                            parent.set_child_below_sibling(this.actor, null);
+
+                                           this._spinner.stop();
                                        },
                                        onCompleteScope: this });
     },



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