Commit 19c41453 authored by Nate Graham's avatar Nate Graham
Browse files

[applets/batterymonitor] Handle "plugged in but still discharging" state

Right now we handle the "plugged in but not charging" state but not the
state where you're plugged in but the power supply doesn't supply enough
power to prevent discharging anyway. We can wiggle the logic around to
catch this case with the existing one for the "plugged in and not
charging" state.
parent 33545505
......@@ -60,6 +60,8 @@ Item {
const state =;
if (state === "NoCharge") {
return i18n("Battery at %1%, not Charging", percent);
} else if (state === "Discharging") {
return i18n("Battery at %1%, plugged in but still discharging", percent);
} else if (state === "Charging") {
return i18n("Battery at %1%, Charging", percent);
......@@ -69,6 +71,12 @@ Item {
Plasmoid.toolTipSubText: {
var parts = [];
// Add special text for the "plugged in but still discharging" case
if (["AC Adapter"] &&["AC Adapter"]["Plugged in"] && === "Discharging") {
parts.push(i18n("The power supply is not powerful enough to charge the battery"))
if (batteries.count === 0) {
parts.push("No Batteries Available");
} else if (remainingTime > 0) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment