Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r5b46bc8e4724e4ddb648f901d76bb7ec24f8b6c7 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 5b46bc8e4724e4ddb648f901d76bb7ec24f8b6c7) @@ -171,11 +171,15 @@ anchors.rightMargin : _root.rightMargin delegate : TouchRect { id : _delegate - property bool isCurrrentNetwork: vNetwork.macAddress === macAddress + readonly property color networkDelegateTextColor : isNetworkSupported ? Colors.textMain : Colors.textDisableButton + readonly property string postSecurityTypeLabel : isNetworkSupported ? "" : " - " + qsTr("Not Supported") + 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 @@ -192,8 +196,8 @@ bottom : parent.bottom } font.pixelSize : Fonts.fontPixelDialogText - text : securityTypes - color : Colors.textMain + text : securityTypes + _delegate.postSecurityTypeLabel + 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() + } } } } @@ -221,16 +227,20 @@ property string ssid : "" property string macAddress : "" property string separator : "\n\n" + readonly property string spaceSeparator : " " // notificationText : vNetwork.status message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) - title : isPassword ? qsTr("Join") + separator + ssid + qsTr("Password") : qsTr("Disconnect") + separator + ssid + 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() } } }