[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace] plasma/generic/applets/batterymonitor/contents/ui: Port away from readConfig
From: David Edmundson <kde () davidedmundson ! co ! uk>
Date: 2014-02-06 17:07:28
Message-ID: E1WBSQC-0001uj-9a () scm ! kde ! org
[Download RAW message or body]
Git commit 16011b49b48da36b15eca707fb0d9c349ea3e4bd by David Edmundson.
Committed on 06/02/2014 at 17:07.
Pushed by davidedmundson into branch 'master'.
Port away from readConfig
M +2 -9 plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
http://commits.kde.org/kde-workspace/16011b49b48da36b15eca707fb0d9c349ea3e4bd
diff --git a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml \
b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml index \
b9cd99e..97dc323 100755
--- a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
+++ b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
@@ -29,19 +29,12 @@ Item {
id: batterymonitor
Plasmoid.switchWidth: units.gridUnit * 10
Plasmoid.switchHeight: units.gridUnit * 10
- property bool show_remaining_time: false
LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
LayoutMirroring.childrenInherit: true
Component.onCompleted: {
- updateLogic(true);
- plasmoid.addEventListener('ConfigChanged', configChanged);
- plasmoid.popupEvent.connect(popupEventSlot);
- }
-
- function configChanged() {
- show_remaining_time = plasmoid.readConfig("showRemainingTime");
+ updateLogic();
}
function updateLogic() {
@@ -118,7 +111,7 @@ Item {
isBrightnessAvailable: pmSource.data["PowerDevil"]["Screen Brightness \
Available"] ? true : false
isKeyboardBrightnessAvailable: pmSource.data["PowerDevil"]["Keyboard \
Brightness Available"] ? true : false
- showRemainingTime: show_remaining_time
+ showRemainingTime: Plasmoid.configuration.showRemainingTime
remainingTime: Number(pmSource.data["Battery"]["Remaining msec"])
pluggedIn: pmSource.data["AC Adapter"]["Plugged in"]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic