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/5584

Thank You,
Marko Saukko

[This message was auto-generated]

---

Request # 5584:

Messages from BOSS:

State: review at 2012-08-12T21:13:52 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,4 @@
+* Fri Aug 10 2012 Dmitry Rozhkov <[email protected]> - 0.2.4
+- Applied patch from Kuisma Salonen. Fixes NEMO#226
+- Simplifications in QML
+

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

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

spec files:
-----------
--- meegotouchcp-connman.spec
+++ meegotouchcp-connman.spec
@@ -1,6 +1,6 @@
 # 
 # Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.25
+# Generated by: spectacle version 0.24.1
 # 
 
 Name:       meegotouchcp-connman
@@ -9,14 +9,14 @@
 # << macros
 
 Summary:    MeegoTouchControlPanel wifi Plugin
-Version:    0.2.3
+Version:    0.2.4
 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.1
+Requires:   connman-qt-declarative >= 0.2.2
 BuildRequires:  qt-qmake
 Obsoletes:   meegotouchcp-connman-branding-upsteam < 0.2.0
 Obsoletes:   meegotouchcp-connman-qt < 0.2.0

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

++++++ meegotouchcp-connman-0.2.3.tar.bz2 -> meegotouchcp-connman-0.2.4.tar.bz2
--- qml/SettingsSheet.qml
+++ qml/SettingsSheet.qml
@@ -8,6 +8,18 @@
     acceptButtonText: "Done"
     rejectButtonText: "Cancel"
 
+    property QtObject network
+
+    onNetworkChanged: {
+        proxyAutoUrl.checked = ! network.proxyConfig["URL"];
+        form.networkName = network.name;
+        form.ipv4 = network.ipv4;
+        form.nameservers = network.nameservers;
+        form.domains = network.domains;
+        form.proxy = network.proxy;
+        form.proxyConfig = network.proxyConfig;
+    }
+
     onAccepted: {
         var domains = [],
             nameservers = [],
@@ -86,11 +98,8 @@
 
     }
 
-    property variant network
-    property alias networkLabel: networkNameLabel.text
-    property alias proxyAutoUrlCheck: proxyAutoUrl.checked
-
     content: Flickable {
+        id: form
         anchors.fill: parent
         anchors.leftMargin: 10
         anchors.topMargin: 10
@@ -98,6 +107,13 @@
         contentHeight: mainColumn.height
         flickableDirection: Flickable.VerticalFlick
 
+        property string networkName: "Error"
+        property variant ipv4: {"Method": "manual", "Address": "", "Netmask": 
"", "Gateway": ""}
+        property variant nameservers: []
+        property variant domains: []
+        property variant proxy: {"Method": "auto", "URL": ""}
+        property variant proxyConfig: {"Servers": []}
+
         Column {
             id: mainColumn
             anchors.top: parent.top
@@ -118,9 +134,8 @@
                 }
 
                 Text {
-                    id: networkNameLabel
                     anchors { left: parent.left; verticalCenter: 
parent.verticalCenter; leftMargin: 80 }
-                    text: "Network name"
+                    text: form.networkName
                     color: "white"
                     font.pointSize: 18
                 }
@@ -157,7 +172,7 @@
                 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"
+                    state: form.ipv4.Method
 
                     states: [
                         State {
@@ -174,14 +189,14 @@
 
                     Button {
                         text: "DHCP"
-                        checked: sheet.network ? sheet.network.ipv4["Method"] 
== "dhcp" : false
+                        checked: form.ipv4.Method == "dhcp"
                         onClicked: {
                             method.state = "dhcp"
                         }
                     }
                     Button {
                         text: "Static"
-                        checked: sheet.network ? sheet.network.ipv4["Method"] 
== "manual" : true
+                        checked: form.ipv4.Method == "manual"
                         onClicked: {
                             method.state = "manual"
                         }
@@ -208,7 +223,7 @@
                         }
                         Text {
                             anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
-                            text: sheet.network ? 
sheet.network.ipv4["Address"] : ""
+                            text: form.ipv4.Address
                             color: "white"
                             font.pointSize: 20
                         }
@@ -225,7 +240,7 @@
                         }
                         Text {
                             anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: sheet.network ? 
sheet.network.ipv4["Netmask"] : ""
+                            text: form.ipv4.Netmask
                             color: "white"
                             font.pointSize: 20
                         }
@@ -242,7 +257,7 @@
                         }
                         Text {
                             anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: sheet.network ? 
sheet.network.ipv4["Gateway"] : ""
+                            text: form.ipv4.Gateway
                             color: "white"
                             font.pointSize: 20
                         }
@@ -259,7 +274,7 @@
                         }
                         Text {
                             anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
-                            text: sheet.network ? 
sheet.network.nameservers.join() : ""
+                            text: form.nameservers.join()
                             color: "white"
                             font.pointSize: 20
                         }
@@ -288,7 +303,7 @@
                             id: address
                             anchors { left: parent.left; leftMargin: 20; 
top:parent.top; topMargin: 30 }
                             width: 440
-                            text: sheet.network ? 
sheet.network.ipv4["Address"] : ""
+                            text: form.ipv4.Address
                             font.pointSize: 20
                         }
                     }
@@ -306,7 +321,7 @@
                             id: netmask
                             anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
                             width: 440
-                            text: sheet.network ? 
sheet.network.ipv4["Netmask"] : ""
+                            text: form.ipv4.Netmask
                             font.pointSize: 20
                         }
                     }
@@ -324,7 +339,7 @@
                             id: gateway
                             anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
                             width: 440
-                            text: sheet.network ? 
sheet.network.ipv4["Gateway"] : ""
+                            text: form.ipv4.Gateway
                             font.pointSize: 20
                         }
                     }
@@ -346,7 +361,7 @@
                                 var nservs = "";
                                 if (sheet.network) {
                                     nservs = 
sheet.network.nameserversConfig.join();
-                                    return nservs ? nservs : 
sheet.network.nameservers.join();
+                                    return nservs ? nservs : 
form.nameservers.join();
                                 } else {
                                     return "";
                                 }
@@ -371,7 +386,7 @@
                     id: domainsField
                     anchors { left: parent.left; leftMargin: 20; top: 
parent.top; topMargin: 30 }
                     width: 440
-                    text: sheet.network ? sheet.network.domains.join() : ""
+                    text: form.domains.join()
                     font.pointSize: 20
                 }
             }
@@ -388,7 +403,7 @@
                 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"
+                    state: form.proxy.Method
 
                     states: [
                         State {
@@ -462,7 +477,7 @@
                             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] : ""
+                            text: form.proxyConfig.Servers ? 
form.proxyConfig.Servers[0].split(":")[0] : ""
                             font.pointSize: 20
                             // TODO: validator
                         }
@@ -481,7 +496,7 @@
                             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] : ""
+                            text: form.proxyConfig.Servers ? 
form.proxyConfig.Servers[0].split(":")[1] : ""
                             font.pointSize: 20
                             // TODO: validator
                         }
@@ -516,13 +531,7 @@
                             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!";
-                                }
-                            }
+                            text: form.proxy.URL
                             font.pointSize: 20
                             // TODO: validator
                         }
--- qml/mainpage.qml
+++ qml/mainpage.qml
@@ -207,10 +207,6 @@
                             console.log(key + " -> " + modelData.ipv4[key]);
                         }
                         settingsSheet.network = modelData;
-                        // TODO: move this block to SettingsSheet.qml
-                        settingsSheet.networkLabel = modelData.name;
-                        settingsSheet.proxyAutoUrlCheck = ! 
modelData.proxyConfig["URL"];
-
                         settingsSheet.open();
                     }
                 }
@@ -225,7 +221,19 @@
         Column {
             spacing: 10
             anchors { fill: parent }
+
+            Text {
+                id: errorLabel
+                visible: !networkingModel.available
+                anchors { left: parent.left; right: parent.right; margins: 64 }
+                text: "connman unavailable"
+                color: "pink"
+                font.pointSize: 24
+            }
+
             Rectangle {
+                id: switchRect
+                enabled: networkingModel.available
                 anchors { left: parent.left; right: parent.right }
                 height: 80
                 color: "black"
@@ -246,6 +254,7 @@
             }
 
             ListView {
+                enabled: networkingModel.available
                 anchors { left: parent.left; right: parent.right }
                 clip: true
                 height: 700

++++++ meegotouchcp-connman.yaml
--- meegotouchcp-connman.yaml
+++ meegotouchcp-connman.yaml
@@ -1,6 +1,6 @@
 Name: meegotouchcp-connman
 Summary: MeegoTouchControlPanel wifi Plugin
-Version: 0.2.3
+Version: 0.2.4
 Release: 1
 Group: System/GUI/Other
 License: Apache License
@@ -13,7 +13,7 @@
 PkgBR:
     - qt-qmake
 Requires:
-    - connman-qt-declarative >= 0.2.1
+    - connman-qt-declarative >= 0.2.2
 Obsoletes:
     # These were removed from version 0.2.0 onwards.
     - meegotouchcp-connman-branding-upsteam < 0.2.0



Reply via email to