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() } } }