[gnome-shell] rfkill: make the Airplane mode menu insensitive in the lock screen
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] rfkill: make the Airplane mode menu insensitive in the lock screen
- Date: Wed, 30 Apr 2014 19:52:56 +0000 (UTC)
commit a000a1f76ef720b88ab8ebfcabff1fefff0c9713
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Apr 29 23:24:27 2014 +0200
rfkill: make the Airplane mode menu insensitive in the lock screen
Like we do for the bluetooth and wifi menus
https://bugzilla.gnome.org/show_bug.cgi?id=729224
js/ui/status/rfkill.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js
index b9d3eaf..b2359d8 100644
--- a/js/ui/status/rfkill.js
+++ b/js/ui/status/rfkill.js
@@ -4,6 +4,7 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Signals = imports.signals;
+const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@@ -87,6 +88,14 @@ const Indicator = new Lang.Class({
}));
this._item.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
this.menu.addMenuItem(this._item);
+
+ Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
+ this._sessionUpdated();
+ },
+
+ _sessionUpdated: function() {
+ let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
+ this.menu.setSensitive(sensitive);
},
_sync: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]