Commit 7fa7d04e authored by Giovanni Campagna's avatar Giovanni Campagna
Browse files

NetworkMenu: show hardware disabled when rfkill is active

When wifi or wwan are blocked by hardware killswitch, we should not
allow changing the switch (it won't work anyway), and show
"hardware disabled" instead, similar to what we already do in the
bluetooth menu.
parent aad91793
......@@ -249,9 +249,11 @@ const NMWirelessSectionTitleMenuItem = new Lang.Class({
updateForDevice: function(device) {
// we show the switch
// - if there not just one device
// - if the switch is off
// - if the switch is off (but it can be turned on)
// - if the device is activated or disconnected
if (device && this._softwareEnabled && this._hardwareEnabled) {
if (!this._hardwareEnabled) {
this.setStatus(_("hardware disabled"));
} else if (device && this._softwareEnabled) {
let text = device.getStatusLabel();
} else
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment