X-Git-Url: https://www.flypig.org.uk/git/?p=openvpnui.git;a=blobdiff_plain;f=qml%2Fpages%2FConfigurePage.qml;h=0db890a47bce007b93efb4364a964dfe37db172f;hp=b6ad3da505cbcc4e896233b3297489109546e20f;hb=2e0816fb79e6c696ada4fe098ba006fca2741a1f;hpb=3aba2d3bed67a9d91350393dd4772f566aca7db1 diff --git a/qml/pages/ConfigurePage.qml b/qml/pages/ConfigurePage.qml index b6ad3da..0db890a 100644 --- a/qml/pages/ConfigurePage.qml +++ b/qml/pages/ConfigurePage.qml @@ -1,6 +1,6 @@ /* - Copyright (C) 2013 Jolla Ltd. - Contact: Thomas Perl + Copyright (C) 2014 David Llewellyn-Jones + Contact: David Llewellyn-Jones All rights reserved. You may use this file under the terms of BSD license as follows: @@ -26,6 +26,10 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Built using the standard template from Jolla + Copyright (C) 2013 Jolla Ltd. + Contact: Thomas Perl */ import QtQuick 2.0 @@ -37,6 +41,10 @@ Dialog { canAccept: true acceptDestinationAction: PageStackAction.Pop + Connections { + target:VpnControl + } + SilicaFlickable { // ComboBox requires a flickable ancestor width: parent.width @@ -60,6 +68,7 @@ Dialog { TextField { id: configureAddress width: parent.width + text: VpnControl.server label: "Server address" placeholderText: "Server address" focus: true @@ -69,6 +78,7 @@ Dialog { TextField { id: configurePort width: parent.width + text: VpnControl.port; inputMethodHints: Qt.ImhFormattedNumbersOnly label: "Port number" placeholderText: "Port number" @@ -78,22 +88,26 @@ Dialog { TextSwitch { id: configureCompression text: "Use Compression" + checked: VpnControl.compressed + automaticCheck: true } TextSwitch { id: configureTLS text: "Use TLS authentication" + checked: VpnControl.useTLS onCheckedChanged: { configureTLSdirection.enabled = checked configureTLSinfo.visible = checked } + automaticCheck: true } // set currentIndex to change the selected value ComboBox { id: configureTLSdirection width: parent.width label: "TLS direction" - currentIndex: 1 + currentIndex: VpnControl.tlsDirection; enabled: false menu: ContextMenu { @@ -139,6 +153,12 @@ Dialog { } onAccepted: { + VpnControl.setServer(configureAddress.text) + VpnControl.setPort(configurePort.text) + VpnControl.setCompressed(configureCompression.checked) + VpnControl.setUseTLS(configureTLS.checked) + VpnControl.setTlsDirection(configureTLSdirection.currentIndex) + VpnControl.updateConfiguration() } }