on xenial help sign in
Fix wifi access point indicator items signal strength icon on desktop

Approved by: Nick Dedekind

commit7406ee208b8e10cf47916e649d1ab88b144a2e80 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 11 Jan 2016, 17:36 (11 years ago) parenta037f1da03cf7e
1 file changed+11−1
qml/Panel/Indicators/MenuItemFactory.qml+11−1
qml/Panel/Indicators/MenuItemFactory.qml+11−1
@@ -576,7 +576,17 @@ Item {
576576 active: serverChecked
577577 secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
578578 adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
579− signalStrength: strengthAction.valid ? strengthAction.state : 0
579+ signalStrength: {
580+ if (strengthAction.valid) {
581+ var state = strengthAction.state; // handle both int and uchar
582+ // FIXME remove the special casing when we switch to indicator-network completely
583+ if (typeof state == "string") {
584+ return state.charCodeAt();
585+ }
586+ return state;
587+ }
588+ return 0;
589+ }
580590 highlightWhenPressed: false
581591
582592 onMenuModelChanged: {