add work with key cache

fix bug with invalid dataengine settings in UI
This commit is contained in:
arcan1s
2015-05-03 03:49:39 +03:00
parent 9a6b883905
commit 104bb52557
22 changed files with 226 additions and 1654 deletions

View File

@ -34,7 +34,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
QtControls.TabView {
height: parent.height
width: parent.width

View File

@ -69,7 +69,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width

View File

@ -49,7 +49,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width

View File

@ -57,7 +57,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width
@ -105,11 +105,11 @@ Item {
id: gpuDev
width: parent.width * 3 / 5
model: ["auto", "disable", "ati", "nvidia"]
onCurrentIndexChanged: cfg_dataengine["GPUDEV"] = model[currentIndex]
Component.onCompleted: {
for (var i=0; i<model.length; i++) {
console.log(cfg_dataengine["GPUDEV"])
if (model[i] == cfg_dataengine["GPUDEV"]) {
gpuDev.currentIndex = i;
currentIndex = i;
}
}
}
@ -130,7 +130,6 @@ Item {
id: hdd
width: parent.width * 3 / 5
model: AWKeys.getHddDevices(true)
onCurrentIndexChanged: cfg_dataengine["HDDDEV"] = model[currentIndex]
Component.onCompleted: {
for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["HDDDEV"]) {
@ -226,7 +225,6 @@ Item {
id: player
width: parent.width * 3 / 5
model: ["mpris", "mpd"]
onCurrentIndexChanged: cfg_dataengine["PLAYER"] = model[currentIndex]
Component.onCompleted: {
for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["PLAYER"]) {
@ -282,6 +280,9 @@ Item {
Component.onDestruction: {
if (debug) console.log("[dataengine::onDestruction]")
cfg_dataengine["GPUDEV"] = gpuDev.currentText
cfg_dataengine["HDDDEV"] = hdd.currentText
cfg_dataengine["PLAYER"] = player.currentText
cfg_dataengine["MPRIS"] = mpris.currentText
AWActions.writeDataEngineConfiguration(cfg_dataengine)
}

View File

@ -96,8 +96,8 @@ Item {
PlasmaCore.DataSource {
id: extsysmonDE
engine: "extsysmon"
connectedSources: ["battery", "custom", "desktop", "netdev", "gpu",
"gputemp", "hddtemp", "pkg", "player", "ps", "update"]
connectedSources: ["battery", "custom", "desktop", "netdev", "gpu", "gputemp",
"hddtemp", "quotes", "pkg", "player", "ps", "update"]
interval: plasmoid.configuration.interval
onNewData: {
@ -171,7 +171,7 @@ Item {
onNeedUpdate: {
if (debug) console.log("[main::onNeedUpdate]")
text.text = AWKeys.parsePattern(plasmoid.configuration.text)
text.text = AWKeys.parsePattern()
tooltip.text = AWKeys.toolTipImage()
}

View File

@ -53,7 +53,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
QtControls.Label {
width: parent.width
horizontalAlignment: Text.AlignHCenter

View File

@ -63,7 +63,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
QtControls.Label {
width: parent.width
horizontalAlignment: Text.AlignHCenter