stackview has the currentitem, not page property

This commit is contained in:
Marco Martin 2013-08-06 14:35:16 +02:00
parent f63357bd29
commit d1a3f07bce

View File

@ -50,16 +50,16 @@ Rectangle {
//BEGIN functions //BEGIN functions
function saveConfig() { function saveConfig() {
for (var key in plasmoid.configuration) { for (var key in plasmoid.configuration) {
if (main.currentPage["cfg_"+key] !== undefined) { if (main.currentItem["cfg_"+key] !== undefined) {
plasmoid.configuration[key] = main.currentPage["cfg_"+key] plasmoid.configuration[key] = main.currentItem["cfg_"+key]
} }
} }
} }
function restoreConfig() { function restoreConfig() {
for (var key in plasmoid.configuration) { for (var key in plasmoid.configuration) {
if (main.currentPage["cfg_"+key] !== undefined) { if (main.currentItem["cfg_"+key] !== undefined) {
main.currentPage["cfg_"+key] = plasmoid.configuration[key] main.currentItem["cfg_"+key] = plasmoid.configuration[key]
} }
} }
} }
@ -207,8 +207,8 @@ Rectangle {
iconSource: "dialog-ok" iconSource: "dialog-ok"
text: "Ok" text: "Ok"
onClicked: { onClicked: {
if (main.currentPage.saveConfig !== undefined) { if (main.currentItem.saveConfig !== undefined) {
main.currentPage.saveConfig() main.currentItem.saveConfig()
} else { } else {
root.saveConfig() root.saveConfig()
} }
@ -219,8 +219,8 @@ Rectangle {
iconSource: "dialog-ok-apply" iconSource: "dialog-ok-apply"
text: "Apply" text: "Apply"
onClicked: { onClicked: {
if (main.currentPage.saveConfig !== undefined) { if (main.currentItem.saveConfig !== undefined) {
main.currentPage.saveConfig() main.currentItem.saveConfig()
} else { } else {
root.saveConfig() root.saveConfig()
} }