Index: scripts/wifi_generate_wpa_supplicant.sh =================================================================== diff -u -r3e7cdf9b112dc6e865323e8381cecfd5d988a927 -rd4c0956d5487d3674429d72fe85dd75692b6d91f --- scripts/wifi_generate_wpa_supplicant.sh (.../wifi_generate_wpa_supplicant.sh) (revision 3e7cdf9b112dc6e865323e8381cecfd5d988a927) +++ scripts/wifi_generate_wpa_supplicant.sh (.../wifi_generate_wpa_supplicant.sh) (revision d4c0956d5487d3674429d72fe85dd75692b6d91f) @@ -53,16 +53,5 @@ #psk=\"\" psk="$psk" }" > $dest;; - wep) - echo "Security: wep"; - echo "ctrl_interface=/var/run/wpa_supplicant -ctrl_interface_group=0 -update_config=1 -network={ - ssid=\"$ssid\" - key_mgmt=NONE - wep_key0=$password - wep_tx_keyidx=0 -}" > $dest;; esac Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -re4344e6f22126881c80ac67d55638c7676f32182 -rd4c0956d5487d3674429d72fe85dd75692b6d91f --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision e4344e6f22126881c80ac67d55638c7676f32182) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision d4c0956d5487d3674429d72fe85dd75692b6d91f) @@ -171,11 +171,15 @@ anchors.rightMargin : _root.rightMargin delegate : TouchRect { id : _delegate - property bool isCurrrentNetwork: vNetwork.macAddress === macAddress + readonly property bool isNetworkSupported : isSecurityTypeSupported + readonly property color networkDelegateTextColor : (isNetworkSupported ? Colors.textMain : Colors.textDisableButton) + property bool isCurrrentNetwork : vNetwork.macAddress === macAddress + clip : true text.text : ssid text.elide : Text.ElideLeft + text.color : _delegate.networkDelegateTextColor width : _networkList.width - Variables.minVGap height : 75 radius : Variables.dialogRadius @@ -193,7 +197,7 @@ } font.pixelSize : Fonts.fontPixelDialogText text : securityTypes - color : Colors.textMain + color : _delegate.networkDelegateTextColor } Text { id : _isConnected @@ -204,15 +208,17 @@ } font.pixelSize : Fonts.fontPixelDialogText text : _delegate.isCurrrentNetwork ? qsTr("Connected") : "" - color : Colors.textMain + color : _delegate.networkDelegateTextColor } onClicked : { - _userConfirmation.isPassword = ! _delegate.isCurrrentNetwork - _userConfirmation.ssid = ssid - _userConfirmation.macAddress = macAddress - push( _userConfirmation ) - _userConfirmation.setFocus() + if( isNetworkSupported ) { + _userConfirmation.isPassword = ! _delegate.isCurrrentNetwork + _userConfirmation.ssid = ssid + _userConfirmation.macAddress = macAddress + push( _userConfirmation ) + _userConfirmation.setFocus() + } } } } @@ -227,11 +233,14 @@ title : isPassword ? qsTr("Join") + separator + ssid + spaceSeparator + qsTr("Password") : qsTr("Disconnect") + separator + ssid onConfirmClicked : { if ( isPassword ) { - vNetwork.doJoinNetwork ( macAddress, password ) + if( password.length > 0 ) { + vNetwork.doJoinNetwork ( macAddress, password ) + pop() + } } else { vNetwork.doDisconnectNetwork( macAddress ) + pop() } - pop() } } } Index: sources/view/settings/VNetworkModel.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rd4c0956d5487d3674429d72fe85dd75692b6d91f --- sources/view/settings/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/settings/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision d4c0956d5487d3674429d72fe85dd75692b6d91f) @@ -168,6 +168,9 @@ return network.status(); case SignalLevelRole: return network.signalLevel(); + case SecurityTypeSupportedRole: + return (!network.securityTypes().contains(MWifiNetwork::SECURITY_TYPE::WEP) && + !network.securityTypes().contains(MWifiNetwork::SECURITY_TYPE::UNSUPPORTED)); } return QVariant(); @@ -185,6 +188,7 @@ roles[SecurityTypesRole] = "securityTypes"; roles[StatusRole] = "status"; roles[SignalLevelRole] = "signalLevel"; + roles[SecurityTypeSupportedRole] = "isSecurityTypeSupported"; return roles; } Index: sources/view/settings/VNetworkModel.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rd4c0956d5487d3674429d72fe85dd75692b6d91f --- sources/view/settings/VNetworkModel.h (.../VNetworkModel.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/settings/VNetworkModel.h (.../VNetworkModel.h) (revision d4c0956d5487d3674429d72fe85dd75692b6d91f) @@ -64,6 +64,7 @@ SecurityTypesRole, StatusRole, SignalLevelRole, + SecurityTypeSupportedRole, }; void addNetwork (const WifiNetworkData &network);