[gnome-shell] UserMenu: don't show a lock icon when we're not actually locked



commit b3549f421dd3affa26e502bae92c6650a159a4c3
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Feb 2 17:30:06 2013 +0100

    UserMenu: don't show a lock icon when we're not actually locked
    
    The screen shield can now be active (forcing the lock-screen session mode)
    without being locked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693007

 js/ui/userMenu.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index 40710a5..1ead590 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -585,6 +585,7 @@ const UserMenuButton = new Lang.Class({
                                        Lang.bind(this, this._updateHaveShutdown));
 
         Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
+        Main.screenShield.connect('locked-changed', Lang.bind(this, this._updatePresenceIcon));
         this._sessionUpdated();
     },
 
@@ -704,6 +705,11 @@ const UserMenuButton = new Lang.Class({
             this._iconBox.child = this._idleIcon;
         else
             this._iconBox.child = this._offlineIcon;
+
+        if (Main.sessionMode.isLocked)
+            this._iconBox.visible = Main.screenShield.locked;
+        else
+            this._iconBox.visible = true;
     },
 
     _setupAccounts: function() {



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