[gnome-shell] Revert "userMenu: Don't update the presence icon immediately"



commit 657887b241b8e887b5329d50dfb4c99b277e2015
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Sep 6 21:21:33 2012 +0200

    Revert "userMenu: Don't update the presence icon immediately"
    
    This reverts commit f1ca96bbf0c56a5eaa135c777045bddb4290cebe.
    We're moving towards atomic panel upgrade, so we don't need this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683526

 js/ui/panel.js     |   13 ++-----------
 js/ui/panelMenu.js |   15 ---------------
 js/ui/userMenu.js  |    9 ---------
 3 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index a92b810..c35bc39 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1131,7 +1131,7 @@ const Panel = new Lang.Class({
     },
 
     _tweenAndUpdatePanel: function() {
-        this._freezeAndCloseIndicators();
+        this._closeIndicatorMenus();
 
         Tweener.addTween(this, {
             boxOpacity: 0,
@@ -1140,7 +1140,6 @@ const Panel = new Lang.Class({
             onCompleteScope: this,
             onComplete: function() {
                 this._updatePanel();
-                this._thawIndicators();
                 Tweener.addTween(this, {
                     boxOpacity: 255,
                     time: Overview.ANIMATION_TIME / 2,
@@ -1154,21 +1153,13 @@ const Panel = new Lang.Class({
         this._tweenAndUpdatePanel();
     },
 
-    _freezeAndCloseIndicators: function() {
+    _closeIndicatorMenus: function() {
         for (let role in this.statusArea) {
             let indicator = this.statusArea[role];
-            indicator.freeze();
             indicator.menu.close();
         }
     },
 
-    _thawIndicators: function() {
-        for (let role in this.statusArea) {
-            let indicator = this.statusArea[role];
-            indicator.thaw();
-        }
-    },
-
     _hideIndicators: function() {
         for (let role in PANEL_ITEM_IMPLEMENTATIONS) {
             let indicator = this.statusArea[role];
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index a20c5fc..939abbb 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -117,21 +117,6 @@ const Button = new Lang.Class({
             this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
 
         this.setName(nameText);
-        this._frozenCount = 0;
-    },
-
-    freeze: function() {
-        this._frozenCount++;
-    },
-
-    thaw: function() {
-        this._frozenCount--;
-        if (this._frozenCount == 0)
-            this.emit('thawed');
-    },
-
-    get frozen() {
-        return this._frozenCount > 0;
     },
 
     setSensitive: function(sensitive) {
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index ab35089..bb3e1a5 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -574,8 +574,6 @@ const UserMenuButton = new Lang.Class({
 
         Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
         this._sessionUpdated();
-
-        this.connect('thawed', Lang.bind(this, this._onThawed));
     },
 
     _sessionUpdated: function() {
@@ -668,9 +666,6 @@ const UserMenuButton = new Lang.Class({
     },
 
     _updatePresenceIcon: function(accountMgr, presence, status, message) {
-        if (this.frozen)
-            return;
-
         if (Main.sessionMode.isLocked)
             this._iconBox.child = this._lockedIcon;
         else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
@@ -803,10 +798,6 @@ const UserMenuButton = new Lang.Class({
         this._presence.status = status;
     },
 
-    _onThawed: function() {
-        this._updatePresenceIcon();
-    },
-
     _onMyAccountActivate: function() {
         Main.overview.hide();
         let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop');



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