[gnome-shell] NetworkMenu/NMDeviceModem: fix status texts for airplane mode
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] NetworkMenu/NMDeviceModem: fix status texts for airplane mode
- Date: Wed, 9 Oct 2013 16:40:48 +0000 (UTC)
commit 777c7a952b8f47f0370bdf4cb30924b84795ef33
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Oct 3 14:31:58 2013 +0200
NetworkMenu/NMDeviceModem: fix status texts for airplane mode
Show "Hardware Disabled" when disabled by HW switch, and
generically "Disabled" when airplane mode is active, as
indicated by v4 mockups.
Note that bluetooth is not affected by NM handling of airplane
mode (and generally the firmware makes the USB bluetooth
adapter disappear when rfkilled), so this is in NMDeviceModem
instead of NMConnectionDevice.
https://bugzilla.gnome.org/show_bug.cgi?id=709043
js/ui/status/network.js | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index c81e94c..1dffb3a 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -460,6 +460,17 @@ const NMDeviceModem = new Lang.Class({
this.parent();
},
+ _getStatus: function() {
+ if (!this._client.wwan_hardware_enabled)
+ return _("Hardware Disabled");
+ else if (!this._client.wwan_enabled)
+ /* Translators: this is for a network device that cannot be activated
+ because it's disabled by rfkill (airplane mode) */
+ return _("Disabled");
+ else
+ return this.parent();
+ },
+
_getMenuIcon: function() {
if (this._device.active_connection)
return this.getIndicatorIcon();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]