Merge pull request #8 from Mershl/pending-charge-handling
Add handling for PENDING_CHARGE state
This commit is contained in:
commit
062516ed9d
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