Add handling for PENDING_CHARGE state
Based on testing the state is reached when the hardware's charge limit blocks further charging. GNOME displays the state as "Not Charging" in the power options and the quick settings. The used icon is the default, non-charging battery. Currently batime shows PENDING_CHARGE as "Estimating..." which suggests a temporary state. Without external change the state is permanent (based on my testing).
This commit is contained in:
parent
127806b4bb
commit
4f6250ee1b
1 changed files with 3 additions and 1 deletions
|
|
@ -14,8 +14,10 @@ var Indicator = GObject.registerClass(
|
||||||
seconds = this._proxy.TimeToFull;
|
seconds = this._proxy.TimeToFull;
|
||||||
} else if (this._proxy.State === UPower.DeviceState.DISCHARGING) {
|
} else if (this._proxy.State === UPower.DeviceState.DISCHARGING) {
|
||||||
seconds = this._proxy.TimeToEmpty;
|
seconds = this._proxy.TimeToEmpty;
|
||||||
|
} else if (this._proxy.State === UPower.DeviceState.PENDING_CHARGE) {
|
||||||
|
return '';
|
||||||
} else {
|
} else {
|
||||||
// state is one of PENDING_CHARGING, PENDING_DISCHARGING
|
// state is PENDING_DISCHARGE or UNKNOWN
|
||||||
return _('Estimating…');
|
return _('Estimating…');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue