diff --git a/applets/systemmonitor/common/contents/config/main.xml b/applets/systemmonitor/common/contents/config/main.xml --- a/applets/systemmonitor/common/contents/config/main.xml +++ b/applets/systemmonitor/common/contents/config/main.xml @@ -9,6 +9,10 @@ + + + 2000 + diff --git a/applets/systemmonitor/common/contents/ui/Applet.qml b/applets/systemmonitor/common/contents/ui/Applet.qml --- a/applets/systemmonitor/common/contents/ui/Applet.qml +++ b/applets/systemmonitor/common/contents/ui/Applet.qml @@ -81,7 +81,7 @@ id: smSource engine: "systemmonitor" - interval: 2000 + interval: plasmoid.configuration.updateInterval onSourceAdded: { if (plasmoid.configuration.sources.length > 0 && plasmoid.configuration.sources.indexOf(encodeURIComponent(source)) === -1) { diff --git a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml --- a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml +++ b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml @@ -48,6 +48,7 @@ } } } + property int cfg_updateInterval signal sourceAdded(string source) @@ -102,6 +103,22 @@ id: mainColumn anchors.left: parent.left + Layouts.RowLayout { + Controls.Label { + text: i18n("Update Interval:") + } + + Controls.SpinBox { + id: updateIntervalSpinBox + decimals: 2 + suffix: i18nc("Suffix for spinbox (seconds)", " sec") + maximumValue: 1000 + stepSize: 0.5 + onValueChanged: cfg_updateInterval = value * 1000 + Component.onCompleted: value = cfg_updateInterval / 1000 + } + } + Repeater { id: repeater model: sourcesModel