I have made the following changes intended for :
  CE:UX:MTF / meegotouchcp-connman

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/5199

Thank You,
Marko Saukko

[This message was auto-generated]

---

Request # 5199:

Messages from BOSS:

State: review at 2012-07-11T19:12:22 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: Project:MTF:UX / meegotouchcp-connman -> CE:UX:MTF / 
meegotouchcp-connman
  
changes files:
--------------
--- meegotouchcp-connman.changes
+++ meegotouchcp-connman.changes
@@ -0,0 +1,3 @@
+* Wed Jul 11 2012 Dmitry Rozhkov <[email protected]> - 0.2.3
+- Reimplement Advanced settings view as Sheet component.
+

old:
----
  meegotouchcp-connman-0.2.2.tar.bz2

new:
----
  meegotouchcp-connman-0.2.3.tar.bz2

spec files:
-----------
--- meegotouchcp-connman.spec
+++ meegotouchcp-connman.spec
@@ -9,14 +9,14 @@
 # << macros
 
 Summary:    MeegoTouchControlPanel wifi Plugin
-Version:    0.2.2
+Version:    0.2.3
 Release:    1
 Group:      System/GUI/Other
 License:    Apache License
 URL:        http://www.meego.com
 Source0:    %{name}-%{version}.tar.bz2
 Source100:  meegotouchcp-connman.yaml
-Requires:   connman-qt-declarative >= 0.2.0
+Requires:   connman-qt-declarative >= 0.2.1
 BuildRequires:  qt-qmake
 Obsoletes:   meegotouchcp-connman-branding-upsteam < 0.2.0
 Obsoletes:   meegotouchcp-connman-qt < 0.2.0
@@ -61,7 +61,7 @@
 %{_libdir}/duicontrolpanel/meegotouchcp-wifi.desktop
 %{_datadir}/duicontrolpanel/wifi/mainpage.qml
 %{_datadir}/duicontrolpanel/wifi/NotificationBanner.qml
-%{_datadir}/duicontrolpanel/wifi/StatusPage.qml
+%{_datadir}/duicontrolpanel/wifi/SettingsSheet.qml
 %{_libdir}/qt4/imports/Connman/js/mustache.js
 # >> files
 # << files

other changes:
--------------

++++++ meegotouchcp-connman-0.2.2.tar.bz2 -> meegotouchcp-connman-0.2.3.tar.bz2
--- qml/SettingsSheet.qml
+++ qml/SettingsSheet.qml
@@ -0,0 +1,534 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import com.nokia.controlpanel 0.1
+import MeeGo.Connman 0.2
+
+Sheet {
+    id: sheet
+    acceptButtonText: "Done"
+    rejectButtonText: "Cancel"
+
+    onAccepted: {
+        var domains = [],
+            nameservers = [],
+            ipv4,
+            proxyconf,
+            proxy_server_text;
+
+        console.log("Accept");
+
+        // Domains
+        if (network.domains.join() !== domainsField.text) {
+            if (domainsField.text) {
+                domains = domainsField.text.split();
+            }
+            console.log("Update Domains: " + domains.join());
+            network.domainsConfig = domains;
+        }
+
+        // IPv4
+        ipv4 = network.ipv4;
+        if (ipv4["Method"] !==  method.state) {
+            ipv4["Method"] = method.state;
+            if (method.state === "manual") {
+                ipv4["Address"] = address.text
+                ipv4["Netmask"] = netmask.text
+                ipv4["Gateway"] = gateway.text
+            }
+            network.ipv4Config = ipv4;
+        } else if (network.ipv4["Method"] === "manual") {
+            if (ipv4["Address"] !== address.text ||
+                ipv4["Netmask"] !== netmask.text ||
+                ipv4["Gateway"] !== gateway.text) {
+
+                ipv4["Address"] = address.text
+                ipv4["Netmask"] = netmask.text
+                ipv4["Gateway"] = gateway.text
+                network.ipv4Config = ipv4;
+            }
+        }
+
+        // Nameservers
+        if (method.state === "manual" &&
+            network.nameserversConfig.join() !== nameserversField.text) {
+            nameservers = nameserversField.text.split();
+            network.nameserversConfig = nameservers;
+        }
+
+        // Proxy
+        proxyconf = network.proxyConfig;
+        if (proxyconf["Method"] !== proxy.state) {
+            proxyconf["Method"] = proxy.state;
+            if (proxy.state === "auto") {
+                proxyconf["URL"] = proxyurl.text;
+            } else if (proxy.state === "manual") {
+                proxyconf["Servers"] = [proxyserver.text + ":" + 
proxyport.text];
+            }
+            network.proxyConfig = proxyconf;
+        } else if (proxy.state === "manual") {
+            proxy_server_text = proxyserver.text + ":" + proxyport.text;
+            if (proxyconf["Servers"].length === 0 || proxyconf["Servers"][0] 
!== proxy_server_text) {
+                proxyconf["Servers"] = [proxy_server_text];
+                network.proxyConfig = proxyconf;
+            }
+        } else if (proxy.state == "auto") {
+            if (proxyAutoUrl.checked && proxyconf["URL"]) {
+                // empty URL to use the provided by DHCP
+                proxyconf["URL"] = "";
+                network.proxyConfig = proxyconf;
+            } else if (! proxyAutoUrl.checked && proxyurl.text !== 
proxyconf["URL"]) {
+                // manual URL is used and it needs update
+                proxyconf["URL"] = proxyurl.text;
+                network.proxyConfig = proxyconf;
+            }
+        }
+
+
+    }
+
+    property variant network
+    property alias networkLabel: networkNameLabel.text
+    property alias proxyAutoUrlCheck: proxyAutoUrl.checked
+
+    content: Flickable {
+        anchors.fill: parent
+        anchors.leftMargin: 10
+        anchors.topMargin: 10
+        //contentWidth: mainColumn.width
+        contentHeight: mainColumn.height
+        flickableDirection: Flickable.VerticalFlick
+
+        Column {
+            id: mainColumn
+            anchors.top: parent.top
+            anchors.left: parent.left
+            anchors.right: parent.right
+            spacing: 10
+
+            Rectangle {
+                anchors { left: parent.left; right: parent.right }
+                height: 80
+                color: "transparent"
+
+                Image {
+                    anchors { left: parent.left; verticalCenter: 
parent.verticalCenter }
+                    source: "image://theme/icon-m-common-wlan-strength5"
+                    width: 60
+                    height: 60
+                }
+
+                Text {
+                    id: networkNameLabel
+                    anchors { left: parent.left; verticalCenter: 
parent.verticalCenter; leftMargin: 80 }
+                    text: "Network name"
+                    color: "white"
+                    font.pointSize: 18
+                }
+            }
+
+            Rectangle {
+                anchors { left: parent.left; right: parent.right }
+                height: 100
+                color: "transparent"
+                Button {
+                    id: disconnectButton
+                    anchors {
+                        horizontalCenter: parent.horizontalCenter
+                        verticalCenter: parent.verticalCenter
+                    }
+                    text: "Disconnect"
+                    onClicked: {
+                        console.log("Disconnect clicked");
+                        network.requestDisconnect();
+                        sheet.close();
+                    }
+                }
+            }
+
+            Item {
+                anchors { left: parent.left; right: parent.right }
+                height: 100
+                Text {
+                    anchors { left: parent.left; leftMargin: 20 }
+                    text: "Method"
+                    color: "grey"
+                    font.pointSize: 14
+                }
+                ButtonRow {
+                    id: method
+                    anchors { left: parent.left; right: parent.right; top: 
parent.top; topMargin: 30; leftMargin: 10; rightMargin: 10 }
+                    state: sheet.network ? sheet.network.ipv4["Method"] : 
"manual"
+
+                    states: [
+                        State {
+                            name: "dhcp"
+                            PropertyChanges {target: networkInfo; visible: 
true}
+                            PropertyChanges {target: networkFields; visible: 
false}
+                        },
+                        State {
+                            name: "manual"
+                            PropertyChanges {target: networkInfo; visible: 
false}
+                            PropertyChanges {target: networkFields; visible: 
true}
+                        }
+                    ]
+
+                    Button {
+                        text: "DHCP"
+                        checked: sheet.network ? sheet.network.ipv4["Method"] 
== "dhcp" : false
+                        onClicked: {
+                            method.state = "dhcp"
+                        }
+                    }
+                    Button {
+                        text: "Static"
+                        checked: sheet.network ? sheet.network.ipv4["Method"] 
== "manual" : true
+                        onClicked: {
+                            method.state = "manual"
+                        }
+                    }
+                }
+            }
+
+            Item {
+                id: networkInfo
+                anchors { left: parent.left; right: parent.right }
+                height: 340
+
+                Column {
+                    spacing: 50
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "IP address"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
+                            text: sheet.network ? 
sheet.network.ipv4["Address"] : ""
+                            color: "white"
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Subnet mask"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            text: sheet.network ? 
sheet.network.ipv4["Netmask"] : ""
+                            color: "white"
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Router"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            text: sheet.network ? 
sheet.network.ipv4["Gateway"] : ""
+                            color: "white"
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "DNS"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            text: sheet.network ? 
sheet.network.nameservers.join() : ""
+                            color: "white"
+                            font.pointSize: 20
+                        }
+                    }
+                }
+            }
+
+            Item {
+                id: networkFields
+                anchors { left: parent.left; right: parent.right }
+                height: 360
+
+                Column {
+                    spacing: 50
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "IP address"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: address
+                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
+                            width: 440
+                            text: sheet.network ? 
sheet.network.ipv4["Address"] : ""
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Subnet mask"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: netmask
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            width: 440
+                            text: sheet.network ? 
sheet.network.ipv4["Netmask"] : ""
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Router"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: gateway
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            width: 440
+                            text: sheet.network ? 
sheet.network.ipv4["Gateway"] : ""
+                            font.pointSize: 20
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "DNS"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: nameserversField
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            width: 440
+                            text: {
+                                var nservs = "";
+                                if (sheet.network) {
+                                    nservs = 
sheet.network.nameserversConfig.join();
+                                    return nservs ? nservs : 
sheet.network.nameservers.join();
+                                } else {
+                                    return "";
+                                }
+                            }
+                            font.pointSize: 20
+                        }
+                    }
+                }
+            }
+
+            Item {
+                height: 100
+                anchors { left: parent.left; right: parent.right }
+
+                Text {
+                    anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                    text: "Search domains"
+                    color: "grey"
+                    font.pointSize: 14
+                }
+                TextField {
+                    id: domainsField
+                    anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                    width: 440
+                    text: sheet.network ? sheet.network.domains.join() : ""
+                    font.pointSize: 20
+                }
+            }
+
+            Item {
+                anchors { left: parent.left; right: parent.right }
+                height: 100
+                Text {
+                    anchors { left: parent.left; leftMargin: 20 }
+                    text: "HTTP Proxy"
+                    color: "grey"
+                    font.pointSize: 14
+                }
+                ButtonRow {
+                    id: proxy
+                    anchors { left: parent.left; right: parent.right; top: 
parent.top; topMargin: 30; leftMargin: 10; rightMargin: 10 }
+                    state: sheet.network ? sheet.network.proxy["Method"] : 
"auto"
+
+                    states: [
+                        State {
+                            name: "direct"
+                            PropertyChanges {target: proxyManualFields; 
visible: false}
+                            PropertyChanges {target: proxyAutoFields; visible: 
false}
+                            PropertyChanges {target: directProxyButton; 
checked: true}
+                            PropertyChanges {target: manualProxyButton; 
checked: false}
+                            PropertyChanges {target: autoProxyButton; checked: 
false}
+                        },
+                        State {
+                            name: "auto"
+                            PropertyChanges {target: proxyManualFields; 
visible: false}
+                            PropertyChanges {target: proxyAutoFields; visible: 
true}
+                            PropertyChanges {target: directProxyButton; 
checked: false}
+                            PropertyChanges {target: manualProxyButton; 
checked: false}
+                            PropertyChanges {target: autoProxyButton; checked: 
true}
+                        },
+                        State {
+                            name: "manual"
+                            PropertyChanges {target: proxyManualFields; 
visible: true}
+                            PropertyChanges {target: proxyAutoFields; visible: 
false}
+                            PropertyChanges {target: directProxyButton; 
checked: false}
+                            PropertyChanges {target: manualProxyButton; 
checked: true}
+                            PropertyChanges {target: autoProxyButton; checked: 
false}
+                        }
+                    ]
+
+                    Button {
+                        id: directProxyButton
+                        text: "Off"
+                        onClicked: {
+                            proxy.state = "direct"
+                        }
+                    }
+                    Button {
+                        id: manualProxyButton
+                        text: "Manual"
+                        onClicked: {
+                            proxy.state = "manual"
+                        }
+                    }
+                    Button {
+                        id: autoProxyButton
+                        text: "Auto"
+                        onClicked: {
+                            proxy.state = "auto"
+                        }
+                    }
+                }
+            }
+
+            Item {
+                id: proxyManualFields
+                anchors { left: parent.left; right: parent.right }
+                height: 440
+
+                Column {
+                    spacing: 50
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Server"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: proxyserver
+                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
+                            width: 440
+                            text: sheet.network && 
sheet.network.proxyConfig["Servers"] ? 
sheet.network.proxyConfig["Servers"][0].split(":")[0] : ""
+                            font.pointSize: 20
+                            // TODO: validator
+                        }
+                    }
+                    Item {
+                        height: 40
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "Port"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: proxyport
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
+                            width: 440
+                            text: sheet.network && 
sheet.network.proxyConfig["Servers"] ? 
sheet.network.proxyConfig["Servers"][0].split(":")[1] : ""
+                            font.pointSize: 20
+                            // TODO: validator
+                        }
+                    }
+                }
+            }
+
+            Item {
+                id: proxyAutoFields
+                anchors { left: parent.left; right: parent.right }
+                height: 440
+
+                Column {
+                    spacing: 50
+                    CheckBox {
+                        id: proxyAutoUrl
+                        text: "Use URL provided by DHCP server"
+                    }
+                    Item {
+                        height: 40
+                        visible: !proxyAutoUrl.checked
+                        anchors { left: parent.left; right: parent.right }
+
+                        Text {
+                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
+                            text: "URL"
+                            color: "grey"
+                            font.pointSize: 14
+                        }
+                        TextField {
+                            id: proxyurl
+                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
+                            width: 440
+                            readOnly: proxyAutoUrl.checked
+                            text: {
+                                if (sheet.network) {
+                                    return sheet.network.proxy["URL"] ? 
sheet.network.proxy["URL"] : "";
+                                } else {
+                                    return "Error!";
+                                }
+                            }
+                            font.pointSize: 20
+                            // TODO: validator
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
--- qml/StatusPage.qml
+++ qml/StatusPage.qml
@@ -1,429 +0,0 @@
-import QtQuick 1.1
-import com.nokia.meego 1.0
-import com.nokia.controlpanel 0.1
-import MeeGo.Connman 0.2
-
-Page {
-    id: statusPage
-    tools: DcpToolBar {}
-
-    property NetworkService network
-    property alias networkLabel: networkNameLabel.text
-
-    Flickable {
-        anchors { fill: parent }
-        contentHeight: 1100
-
-        Column {
-            spacing: 10
-            anchors { fill: parent }
-            Item {
-                anchors { left: parent.left; right: parent.right }
-                height: 80
-
-                Image {
-                    anchors { left: parent.left; verticalCenter: 
parent.verticalCenter }
-                    source: "image://theme/icon-m-common-wlan-strength5"
-                    width: 60
-                    height: 60
-                }
-
-                Text {
-                    id: networkNameLabel
-                    anchors { left: parent.left; verticalCenter: 
parent.verticalCenter; leftMargin: 80 }
-                    text: "Network name"
-                    color: "white"
-                    font.pointSize: 18
-                }
-            }
-
-            Item {
-                anchors { left: parent.left; right: parent.right }
-                height: 100
-                Button {
-                    id: disconnectButton
-                    anchors {
-                        horizontalCenter: parent.horizontalCenter
-                        verticalCenter: parent.verticalCenter
-                    }
-                    text: "Disconnect"
-                    onClicked: {
-                        console.log("Disconnect clicked");
-                        network.requestDisconnect();
-                        pageStack.pop();
-                    }
-                }
-            }
-
-            Item {
-                anchors { left: parent.left; right: parent.right }
-                height: 100
-                Text {
-                    anchors { left: parent.left; leftMargin: 20 }
-                    text: "Method"
-                    color: "grey"
-                    font.pointSize: 14
-                }
-                ButtonRow {
-                    id: method
-                    anchors { left: parent.left; right: parent.right; top: 
parent.top; topMargin: 30; leftMargin: 10; rightMargin: 10 }
-                    state: statusPage.network.ipv4["Method"]
-
-                    states: [
-                        State {
-                            name: "dhcp"
-                            PropertyChanges {target: networkInfo; visible: 
true}
-                            PropertyChanges {target: networkFields; visible: 
false}
-                        },
-                        State {
-                            name: "manual"
-                            PropertyChanges {target: networkInfo; visible: 
false}
-                            PropertyChanges {target: networkFields; visible: 
true}
-                        }
-                    ]
-
-                    Button {
-                        text: "DHCP"
-                        checked: statusPage.network.ipv4["Method"] == "dhcp"
-                        onClicked: {
-                            method.state = "dhcp"
-                        }
-                    }
-                    Button {
-                        text: "Static"
-                        checked: statusPage.network.ipv4["Method"] == "manual"
-                        onClicked: {
-                            method.state = "manual"
-                        }
-                    }
-                }
-            }
-
-            Item {
-                id: networkInfo
-                anchors { left: parent.left; right: parent.right }
-                height: 440
-
-                Column {
-                    spacing: 50
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "IP address"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
-                            text: statusPage.network.ipv4["Address"]
-                            color: "white"
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Subnet mask"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: statusPage.network.ipv4["Netmask"]
-                            color: "white"
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Router"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: statusPage.network.ipv4["Gateway"]
-                            color: "white"
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "DNS"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: statusPage.network.nameservers.join()
-                            color: "white"
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 60
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Search domains"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: statusPage.network.domains.join()
-                            color: "white"
-                            font.pointSize: 20
-                        }
-                    }
-                }
-            }
-
-            Item {
-                id: networkFields
-                anchors { left: parent.left; right: parent.right }
-                height: 440
-
-                Column {
-                    spacing: 50
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "IP address"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network.ipv4["Address"]
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Subnet mask"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network.ipv4["Netmask"]
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Router"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network.ipv4["Gateway"]
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "DNS"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network.nameservers.join()
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 60
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Search domains"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network.domains.join()
-                            font.pointSize: 20
-                        }
-                    }
-                }
-            }
-
-            Item {
-                anchors { left: parent.left; right: parent.right }
-                height: 100
-                Text {
-                    anchors { left: parent.left; leftMargin: 20 }
-                    text: "HTTP Proxy"
-                    color: "grey"
-                    font.pointSize: 14
-                }
-                ButtonRow {
-                    id: proxy
-                    anchors { left: parent.left; right: parent.right; top: 
parent.top; topMargin: 30; leftMargin: 10; rightMargin: 10 }
-                    state: statusPage.network ? 
statusPage.network.proxy["Method"] : "auto"
-
-                    states: [
-                        State {
-                            name: "direct"
-                            PropertyChanges {target: proxyManualFields; 
visible: false}
-                            PropertyChanges {target: proxyAutoFields; visible: 
false}
-                            PropertyChanges {target: directProxyButton; 
checked: true}
-                            PropertyChanges {target: manualProxyButton; 
checked: false}
-                            PropertyChanges {target: autoProxyButton; checked: 
false}
-                        },
-                        State {
-                            name: "auto"
-                            PropertyChanges {target: proxyManualFields; 
visible: false}
-                            PropertyChanges {target: proxyAutoFields; visible: 
true}
-                            PropertyChanges {target: directProxyButton; 
checked: false}
-                            PropertyChanges {target: manualProxyButton; 
checked: false}
-                            PropertyChanges {target: autoProxyButton; checked: 
true}
-                        },
-                        State {
-                            name: "manual"
-                            PropertyChanges {target: proxyManualFields; 
visible: true}
-                            PropertyChanges {target: proxyAutoFields; visible: 
false}
-                            PropertyChanges {target: directProxyButton; 
checked: false}
-                            PropertyChanges {target: manualProxyButton; 
checked: true}
-                            PropertyChanges {target: autoProxyButton; checked: 
false}
-                        }
-                    ]
-
-                    Button {
-                        id: directProxyButton
-                        text: "Off"
-                        onClicked: {
-                            proxy.state = "direct"
-                        }
-                    }
-                    Button {
-                        id: manualProxyButton
-                        text: "Manual"
-                        onClicked: {
-                            proxy.state = "manual"
-                        }
-                    }
-                    Button {
-                        id: autoProxyButton
-                        text: "Auto"
-                        onClicked: {
-                            proxy.state = "auto"
-                        }
-                    }
-                }
-            }
-
-            Item {
-                id: proxyManualFields
-                anchors { left: parent.left; right: parent.right }
-                height: 440
-
-                Column {
-                    spacing: 50
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Server"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
-                            width: 440
-                            text: "this is Server"
-                            font.pointSize: 20
-                        }
-                    }
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "Port"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            width: 440
-                            text: "this is Port"
-                            font.pointSize: 20
-                        }
-                    }
-                }
-            }
-
-            Item {
-                id: proxyAutoFields
-                anchors { left: parent.left; right: parent.right }
-                height: 440
-
-                Column {
-                    spacing: 50
-                    Item {
-                        height: 40
-                        anchors { left: parent.left; right: parent.right }
-
-                        Text {
-                            anchors { left: parent.left; leftMargin: 20; top: 
parent.top }
-                            text: "URL"
-                            color: "grey"
-                            font.pointSize: 14
-                        }
-                        TextField {
-                            anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
-                            width: 440
-                            text: statusPage.network ? 
statusPage.network.proxy["URL"] : "Error!"
-                            font.pointSize: 20
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
--- qml/mainpage.qml
+++ qml/mainpage.qml
@@ -7,6 +7,11 @@
 PageStackWindow {
     id: mainWindow
     initialPage: mainPage
+
+    // this is a workaround for orientation bug triggered in case 
PageStackWindow
+    // is used as a top level component in CP plugin
+    rotation: screen.orientationString == 'Portrait' ? 90 : 0
+
     property variant netfields: {}
 
     function handleInput(key, value) {
@@ -110,7 +115,11 @@
 
         onErrorReported: {
             console.log("Got error from model: " + error);
-            mainpageNotificationBanner.text = "Incorrect value entered. Try 
again."
+            if (error == "invalid-key") {
+                mainpageNotificationBanner.text = "Incorrect value entered. 
Try again."
+            } else {
+                mainpageNotificationBanner.text = "Connect failed"
+            }
             mainpageNotificationBanner.show()
         }
     }
@@ -197,9 +206,12 @@
                         for (var key in modelData.ipv4) {
                             console.log(key + " -> " + modelData.ipv4[key]);
                         }
-                        networkStatusPage.networkLabel = modelData.name;
-                        networkStatusPage.network = modelData;
-                        pageStack.push(networkStatusPage);
+                        settingsSheet.network = modelData;
+                        // TODO: move this block to SettingsSheet.qml
+                        settingsSheet.networkLabel = modelData.name;
+                        settingsSheet.proxyAutoUrlCheck = ! 
modelData.proxyConfig["URL"];
+
+                        settingsSheet.open();
                     }
                 }
             }
@@ -334,8 +346,8 @@
         }
     }
 
-    StatusPage {
-        id: networkStatusPage
+    SettingsSheet {
+        id: settingsSheet
     }
 
     NotificationBanner {
--- qml/qml.pro
+++ qml/qml.pro
@@ -5,7 +5,7 @@
 desktop_entry.files = meegotouchcp-wifi.desktop
 
 qmlpages.path = /usr/share/duicontrolpanel/wifi
-qmlpages.files = mainpage.qml StatusPage.qml NotificationBanner.qml
+qmlpages.files = mainpage.qml SettingsSheet.qml NotificationBanner.qml
 
 mustache.path = /usr/lib/qt4/imports/Connman/js/
 mustache.files = mustache.js

++++++ meegotouchcp-connman.yaml
--- meegotouchcp-connman.yaml
+++ meegotouchcp-connman.yaml
@@ -1,6 +1,6 @@
 Name: meegotouchcp-connman
 Summary: MeegoTouchControlPanel wifi Plugin
-Version: 0.2.2
+Version: 0.2.3
 Release: 1
 Group: System/GUI/Other
 License: Apache License
@@ -13,7 +13,7 @@
 PkgBR:
     - qt-qmake
 Requires:
-    - connman-qt-declarative >= 0.2.0
+    - connman-qt-declarative >= 0.2.1
 Obsoletes:
     # These were removed from version 0.2.0 onwards.
     - meegotouchcp-connman-branding-upsteam < 0.2.0
@@ -24,5 +24,5 @@
 - "%{_libdir}/duicontrolpanel/meegotouchcp-wifi.desktop"
 - "%{_datadir}/duicontrolpanel/wifi/mainpage.qml"
 - "%{_datadir}/duicontrolpanel/wifi/NotificationBanner.qml"
-- "%{_datadir}/duicontrolpanel/wifi/StatusPage.qml"
+- "%{_datadir}/duicontrolpanel/wifi/SettingsSheet.qml"
 - "%{_libdir}/qt4/imports/Connman/js/mustache.js"



Reply via email to