[gnome-shell] Panel: don't animate session mode switches



commit 8c534163e1bd62a0fdf6cbaa54d75dea8d116f42
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Sep 6 21:22:57 2012 +0200

    Panel: don't animate session mode switches
    
    It causes problems with extensions, and it's excessively distracting.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683526

 js/ui/panel.js |   34 +++-------------------------------
 1 files changed, 3 insertions(+), 31 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index c35bc39..f057573 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -965,7 +965,7 @@ const Panel = new Lang.Class({
         Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here-symbolic',
                                         { sortGroup: CtrlAltTab.SortGroup.TOP });
 
-        Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
+        Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
         this._updatePanel();
     },
 
@@ -1130,41 +1130,13 @@ const Panel = new Lang.Class({
         }
     },
 
-    _tweenAndUpdatePanel: function() {
-        this._closeIndicatorMenus();
-
-        Tweener.addTween(this, {
-            boxOpacity: 0,
-            time: Overview.ANIMATION_TIME / 2,
-            transition: 'easeOutQuad',
-            onCompleteScope: this,
-            onComplete: function() {
-                this._updatePanel();
-                Tweener.addTween(this, {
-                    boxOpacity: 255,
-                    time: Overview.ANIMATION_TIME / 2,
-                    transition: 'easeOutQuad'
-                });
-            }
-        });
-    },
-
-    _sessionUpdated: function() {
-        this._tweenAndUpdatePanel();
-    },
-
-    _closeIndicatorMenus: function() {
-        for (let role in this.statusArea) {
-            let indicator = this.statusArea[role];
-            indicator.menu.close();
-        }
-    },
-
     _hideIndicators: function() {
         for (let role in PANEL_ITEM_IMPLEMENTATIONS) {
             let indicator = this.statusArea[role];
             if (!indicator)
                 continue;
+            if (indicator.menu)
+                indicator.menu.close();
             indicator.container.hide();
         }
     },



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