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
This commit is contained in:
Giovanni Campagna 2013-02-02 17:30:06 +01:00
parent ae0accb5a4
commit b3549f421d

View File

@ -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() {