37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 52c59ac0dd7ddbe064ea4b9873492ec76e289c65 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
Date: Fri, 2 Nov 2018 13:51:33 -0700
|
|
Subject: [PATCH 03/25] power: Label the PENDING_CHARGE state as "Not Charging"
|
|
|
|
The pending-charge state means AC power is on but the battery is not
|
|
being charged. This can happen because its charge is above a certain
|
|
threshold, to avoid short charging cycles and prolong the battery's
|
|
life, or because the PSU is not powerful enough to charge the batteries.
|
|
|
|
Instead of lying to the user about something being estimated, we should
|
|
simply tell the truth and set the label to "Not Charging".
|
|
|
|
Closes: #701.
|
|
---
|
|
js/ui/status/power.js | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
|
|
index f21693f53..4a6ce2c24 100644
|
|
--- a/js/ui/status/power.js
|
|
+++ b/js/ui/status/power.js
|
|
@@ -70,7 +70,9 @@ var Indicator = new Lang.Class({
|
|
seconds = this._proxy.TimeToFull;
|
|
else if (this._proxy.State == UPower.DeviceState.DISCHARGING)
|
|
seconds = this._proxy.TimeToEmpty;
|
|
- // state is one of PENDING_CHARGING, PENDING_DISCHARGING
|
|
+ else if (this._proxy.State == UPower.DeviceState.PENDING_CHARGE)
|
|
+ return _("Not Charging");
|
|
+ // state is PENDING_DISCHARGE
|
|
else
|
|
return _("Estimating…");
|
|
|
|
--
|
|
2.20.0
|
|
|