network: Make sure that the network menu is insensitive when in the lock screen

Since the network section of the aggregate menu will be shown in the lock
screen, we need to ensure that users can't tweak with network settings or
anything like that.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
This commit is contained in:
Jasper St. Pierre 2013-06-12 03:37:50 -04:00
parent 6827dacb4b
commit c8c839a569

View File

@ -713,6 +713,14 @@ const NMApplet = new Lang.Class({
this._client.connect('device-added', Lang.bind(this, this._deviceAdded));
this._client.connect('device-removed', Lang.bind(this, this._deviceRemoved));
this._settings.connect('new-connection', Lang.bind(this, this._newConnection));
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._sessionUpdated();
},
_sessionUpdated: function() {
let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
this._section.setSensitive(sensitive);
},
_ensureSource: function() {