[gnome-shell] system: Do not disable suspend action when locked
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] system: Do not disable suspend action when locked
- Date: Fri, 27 May 2016 15:05:24 +0000 (UTC)
commit 2425b11df6d1d5725b58b47199f8985f82d9cd77
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 18 23:54:25 2015 +0100
system: Do not disable suspend action when locked
gnome-settings-daemon now allows the corresponding keybinding, so
for consistency it makes sense to show the button as well.
https://bugzilla.gnome.org/show_bug.cgi?id=725960
js/ui/status/system.js | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index 4981d94..1d666cf 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -306,14 +306,17 @@ const Indicator = new Lang.Class({
},
_updateHaveSuspend: function() {
- this._loginManager.canSuspend(Lang.bind(this, function(result) {
- this._haveSuspend = result;
- this._updateSuspend();
- }));
+ this._loginManager.canSuspend(Lang.bind(this,
+ function(canSuspend, needsAuth) {
+ this._haveSuspend = canSuspend;
+ this._suspendNeedsAuth = needsAuth;
+ this._updateSuspend();
+ }));
},
_updateSuspend: function() {
- let disabled = Main.sessionMode.isLocked ||
+ let disabled = (Main.sessionMode.isLocked &&
+ this._suspendNeedsAuth) ||
(Main.sessionMode.isGreeter &&
this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY));
this._suspendAction.visible = this._haveSuspend && !disabled;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]