Changeset View
Changeset View
Standalone View
Standalone View
applets/batterymonitor/package/contents/ui/batterymonitor.qml
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 51 | Plasmoid.toolTipMainText: { | |||
---|---|---|---|---|---|
52 | if (batteries.count === 0 || !pmSource.data["Battery"]["Has Cumulative"]) { | 52 | if (batteries.count === 0 || !pmSource.data["Battery"]["Has Cumulative"]) { | ||
53 | return plasmoid.title | 53 | return plasmoid.title | ||
54 | } else if (pmSource.data["Battery"]["State"] === "FullyCharged") { | 54 | } else if (pmSource.data["Battery"]["State"] === "FullyCharged") { | ||
55 | return i18n("Fully Charged"); | 55 | return i18n("Fully Charged"); | ||
56 | } | 56 | } | ||
57 | if (pmSource.data["AC Adapter"] && pmSource.data["AC Adapter"]["Plugged in"]) { | 57 | if (pmSource.data["AC Adapter"] && pmSource.data["AC Adapter"]["Plugged in"]) { | ||
58 | if (pmSource.data.Battery.State === "NoCharge") { | 58 | if (pmSource.data.Battery.State === "NoCharge") { | ||
59 | return i18n("Battery at %1%, not Charging", pmSource.data.Battery.Percent) | 59 | return i18n("Battery at %1%, not Charging", pmSource.data.Battery.Percent) | ||
60 | } else { | ||||
61 | return i18n("Battery charging, currently at %1%", pmSource.data.Battery.Percent) | ||||
broulik: Also, just because it's plugged in, doesn't mean it's charging. | |||||
60 | } | 62 | } | ||
61 | } else { | 63 | } else { | ||
62 | return i18n("Battery at %1%", pmSource.data.Battery.Percent); | 64 | return i18n("Battery at %1%", pmSource.data.Battery.Percent); | ||
63 | } | 65 | } | ||
64 | } | 66 | } | ||
65 | 67 | | |||
66 | Plasmoid.toolTipSubText: { | 68 | Plasmoid.toolTipSubText: { | ||
67 | var parts = []; | 69 | var parts = []; | ||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |
Also, just because it's plugged in, doesn't mean it's charging.