Commit 7fa6d8ab authored by Martin Kacej's avatar Martin Kacej

loading of settings to dialog

parent 7c3521e1
......@@ -24,6 +24,7 @@ import org.kde.kirigami 2.2 as Kirigami
Kirigami.ScrollablePage{
property var details
property var path
property alias signal_strength: signalStrengthLabel.text
property alias signal_speed: linkSpeedLabel.text
property alias ip_address: ipAddressLabel.text
......@@ -121,7 +122,7 @@ Kirigami.ScrollablePage{
}
function fillDetails() {
var d = {}
/* var d = {}
for (var i = 0; i < (details.length / 2); i++){
d[details[(i * 2)]] = details[(i * 2) + 1]
}
......@@ -140,10 +141,14 @@ Kirigami.ScrollablePage{
IPDetailsSection.dns = activeMap["dns"]
IPDetailsSection.prefix = activeMap["prefix"]
IPDetailsSection.gateway = activeMap["gateway"]
}*/
}
}
function clearDetails() {
signal_speed = signal_strength = ip_address = 0
security = "Unknown"
function loadNetworkSettings() {
console.info(path);
settings = utils.getConnectionSettings(path,"connection");
detailsSecuritySection.securityMap = utils.getConnectionSettings(path,"802-11-wireless-security");
detailsIP.ipmap = utils.getConnectionSettings(path,"ipv4");
console.info(detailsIP.ipmap["method"]);
}
}
......@@ -118,7 +118,8 @@ Kirigami.SwipeListItem {
},
Kirigami.Action {
iconName: "configure"
onTriggered: getDetails()
visible: (Uuid != "")? true : false
onTriggered: getConfigureDialog()
},
Kirigami.Action {
iconName: "entry-delete"
......@@ -127,19 +128,10 @@ Kirigami.SwipeListItem {
}
]
function getDetails() {
main.path = ConnectionPath
applicationWindow().pageStack.push(networkDetailsViewComponent,ConnectionPath)
if (networkDetailsViewComponent.status == Component.Ready){
console.info("Network view ready")
utils.getActiveConnectionInfo(ConnectionPath)
map = utils.getConnectionSettings(ConnectionPath,"ipv4")
if (ConnectionState == PlasmaNM.Enums.Activated){
//networkDetailsViewComponentView.activeMap = handler.getActiveConnectionInfo(ConnectionPath)
}
//networkDetailsViewContent.map = map
//networkDetailsViewComponentView.fillDetails()
}
function getConfigureDialog() {
var item = applicationWindow().pageStack.push(networkDetailsViewComponent)
item.path = ConnectionPath
item.loadNetworkSettings()
}
function changeState() {
......
......@@ -75,7 +75,6 @@ Kirigami.ApplicationItem {
Component {
id: networkDetailsViewComponent
NetworkDetailsView {
id: networkDetailsViewComponentView
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment