[gnome-shell] statusArea: hide power indicator on desktop



commit 87e021cd2ec1594f5d6a347c7e27ba928d8b1a32
Author: Tim Lunn <tim feathertop org>
Date:   Sat Sep 1 12:21:34 2012 +1000

    statusArea: hide power indicator on desktop
    
    On a desktop system the power indicator does not get hidden correctly,
    since a blank icon '' is returned instead of null.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683080

 js/ui/status/power.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index ea76549..1669734 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -152,11 +152,12 @@ const Indicator = new Lang.Class({
 
     _syncIcon: function() {
         let icon = this._proxy.Icon;
-        let hasIcon = (icon != null);
+        let hasIcon = false;
 
-        if (hasIcon) {
+        if (icon) {
             let gicon = Gio.icon_new_for_string(icon);
             this.setGIcon(gicon);
+            hasIcon = true;
         }
         this.mainIcon.visible = hasIcon;
         this.actor.visible = hasIcon && !this._isLocked;



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