power: Fix undefined variables
A couple of variables that should have been gathered from the proxy and weren't.
This commit is contained in:
parent
76928390a3
commit
0cfa7c1c56
@ -79,14 +79,14 @@ const Indicator = new Lang.Class({
|
|||||||
let minutes = time % 60;
|
let minutes = time % 60;
|
||||||
let hours = Math.floor(time / 60);
|
let hours = Math.floor(time / 60);
|
||||||
|
|
||||||
if (state == UPower.DeviceState.DISCHARGING) {
|
if (this._proxy.State == UPower.DeviceState.DISCHARGING) {
|
||||||
// Translators: this is <hours>:<minutes> Remaining (<percentage>)
|
// Translators: this is <hours>:<minutes> Remaining (<percentage>)
|
||||||
return _("%d\u2236%02d Remaining (%d%%)").format(hours, minutes, percentage);
|
return _("%d\u2236%02d Remaining (%d%%)").format(hours, minutes, this._proxy.Percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == UPower.DeviceState.CHARGING) {
|
if (this._proxy.State == UPower.DeviceState.CHARGING) {
|
||||||
// Translators: this is <hours>:<minutes> Until Full (<percentage>)
|
// Translators: this is <hours>:<minutes> Until Full (<percentage>)
|
||||||
return _("%d\u2236%02d Until Full (%d%%)").format(hours, minutes, percentage);
|
return _("%d\u2236%02d Until Full (%d%%)").format(hours, minutes, this._proxy.Percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user