Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -r574c7c5fb48b1fcb72337f5fb4c0119a20288815 -rdb52d097addadd2eef6102340778be143ee81df4 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 574c7c5fb48b1fcb72337f5fb4c0119a20288815) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision db52d097addadd2eef6102340778be143ee81df4) @@ -43,6 +43,7 @@ readonly property int rightMargin : 50 readonly property int topMargin : topMarginContent - 40 // moved up to top of the keyboard + readonly property bool isValid : _ipAddress .textInput.acceptableInput && _gateway .textInput.acceptableInput @@ -69,7 +70,7 @@ TextEntry { id : _ipAddress nextInput : _gateway // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "vNetwork.ipAddress" //TODO: Wifi + textInput.text : "ipAddress" //TODO: Wifi label.text : qsTr("IP Address") textInput.width : entryWidth label.width : labelWidth @@ -82,7 +83,7 @@ TextEntry { id : _gateway nextInput : _subnetmask // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "vNetwork.gateway" //TODO: Wifi + textInput.text : "gateway" //TODO: Wifi textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Gateway") @@ -95,7 +96,7 @@ TextEntry { id : _subnetmask nextInput : _dns // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "vNetwork.subnetMask" //TODO: Wifi + textInput.text : "subnetMask" //TODO: Wifi textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Subnet Mask") @@ -107,7 +108,7 @@ } TextEntry { id : _dns - textInput.text : "vNetwork.dns" //TODO: Wifi + textInput.text : "dns" //TODO: Wifi textInput.width : entryWidth label.width : labelWidth label.text : qsTr("DNS") @@ -136,7 +137,7 @@ font.pixelSize : Fonts.fontPixelTextRectExtra color : Colors.textMain horizontalAlignment : TextInput.Alignleft - text : "vNetwork.ssid" //TODO: Wifi + text : "" width : entryWidth } } @@ -170,9 +171,13 @@ TouchRect { id : _delegate readonly property color networkDelegateTextColor : wifiSupported ? Colors.textMain : Colors.textDisableButton readonly property string postSecurityTypeLabel : wifiSupported ? "" : " - " + qsTr("Not Supported") - property bool isCurrrentNetwork : vDevice.wifiSupported === wifiSupported + readonly property bool isConnected : wifiConnected + onIsConnectedChanged: { + if ( isConnected ) { + _ssidText.text = wifiSsid + } + } - clip : true text.text : wifiSsid text.elide : Text.ElideLeft @@ -184,7 +189,8 @@ text.anchors.horizontalCenter : undefined text.horizontalAlignment : Text.AlignLeft text.leftPadding : 5 - border.width : 1 + border.width : 1 + borderColor : wifiConnected ? Colors.borderButtonSelected : Colors.borderButton Text { id : _securityLevel anchors { @@ -204,15 +210,15 @@ bottom : parent.bottom } font.pixelSize : Fonts.fontPixelDialogText - text : _delegate.isCurrrentNetwork ? qsTr("Connected") : "" + text : wifiConnected ? qsTr("Connected") : "" color : _delegate.networkDelegateTextColor } onClicked : { - if( isNetworkSupported ) { - _userConfirmation.isPassword = ! _delegate.isCurrrentNetwork - _userConfirmation.ssid = ssid - _userConfirmation.macAddress = macAddress + if( wifiSupported ) { + _userConfirmation.isPassword = ! wifiConnected + _userConfirmation.ssid = wifiSsid + _userConfirmation.macAddress = wifiMacAddress push( _userConfirmation ) _userConfirmation.setFocus() } @@ -225,7 +231,7 @@ property string macAddress : "" property string separator : "\n\n" readonly property string spaceSeparator : " " - // notificationText : vNetwork.status + notificationText : vDevice.status message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) title : isPassword ? qsTr("Join") + separator + ssid + spaceSeparator + qsTr("Password") : qsTr("Disconnect") + separator + ssid onConfirmClicked : {