on xenial help sign in
try harder to filter out enterprise wifis
commitfe8c9d34fe28e15521b38b7f1548fd601d5bf6a5 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 16 Sep 2015, 15:13 (11 years ago) parentcecadcb
1 file changed+10−4
qml/Wizard/Pages/30-wifi.qml+10−4
qml/Wizard/Pages/30-wifi.qml+10−4
@@ -85,7 +85,6 @@ LocalComponents.Page {
8585 }
8686 readonly property bool secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
8787 readonly property bool adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
88− readonly property bool enterprise: getExtendedProperty(extendedData, "xCanonicalWifiApIsEnterprise", false)
8988 property int signalStrength: strengthAction.valid ? strengthAction.state : 0
9089 property int menuIndex: -1
9190
@@ -93,12 +92,11 @@ LocalComponents.Page {
9392 if (!unityMenuModel || menuIndex == -1) return;
9493 unityMenuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool',
9594 'x-canonical-wifi-ap-is-secure': 'bool',
96− 'x-canonical-wifi-ap-is-enterprise': 'bool',
9795 'x-canonical-wifi-ap-strength-action': 'string'});
9896 }
9997
10098 text: menuData && menuData.label || ""
101− enabled: menuData && menuData.sensitive && !enterprise || false
99+ enabled: menuData && menuData.sensitive || false
102100 __foregroundColor: textColor
103101 showDivider: true
104102 iconName: {
@@ -175,7 +173,15 @@ LocalComponents.Page {
175173 anchors.left: parent.left
176174 anchors.right: parent.right
177175 asynchronous: true
178− sourceComponent: isAccessPoint ? accessPointComponent : null
176+ sourceComponent: {
177+ if (isAccessPoint) {
178+ menuModel.loadExtendedAttributes(index, {'x-canonical-wifi-ap-is-enterprise': 'bool'}); // filter out enterprise wifis, lpbug:#1475023
179+ if (!getExtendedProperty(menuModel.ext, "xCanonicalWifiApIsEnterprise", false)) {
180+ return accessPoint;
181+ }
182+ return null;
183+ }
184+ }
179185
180186 onLoaded: {
181187 item.menuData = Qt.binding(function() { return model; });