[gnome-shell] power: Fix undefined variables



commit 0cfa7c1c5607c36ec60f4ad7db1007bdcb1403f1
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Oct 19 17:59:32 2013 +0200

    power: Fix undefined variables
    
    A couple of variables that should have been gathered from the proxy
    and weren't.

 js/ui/status/power.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index 69a8d20..c7646fb 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -79,14 +79,14 @@ const Indicator = new Lang.Class({
         let minutes = 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>)
-            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>)
-            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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]