[gnome-shell] bluetooth: Make insensitive when locked
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] bluetooth: Make insensitive when locked
- Date: Sat, 15 Mar 2014 13:20:22 +0000 (UTC)
commit 4589ce4d786a903999e49af3e4f4faaeab36c5d9
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 15 08:53:54 2014 +0100
bluetooth: Make insensitive when locked
Most system menu entries are disabled on the lock/login screen;
there is no good reason why users should be allowed to turn bluetooth
on/off (but not e.g. Wifi), so disable the entry as well.
https://bugzilla.gnome.org/show_bug.cgi?id=726319
js/ui/status/bluetooth.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 920fbe2..67276a7 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -58,6 +58,7 @@ const Indicator = new Lang.Class({
this._model.connect('row-changed', Lang.bind(this, this._sync));
this._model.connect('row-deleted', Lang.bind(this, this._sync));
this._model.connect('row-inserted', Lang.bind(this, this._sync));
+ Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
this._sync();
},
@@ -92,7 +93,9 @@ const Indicator = new Lang.Class({
_sync: function() {
let nDevices = this._getNConnectedDevices();
+ let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
+ this.menu.setSensitive(sensitive);
this._indicator.visible = nDevices > 0;
this._item.actor.visible = !this._proxy.BluetoothAirplaneMode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]