From 87e021cd2ec1594f5d6a347c7e27ba928d8b1a32 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Sat, 1 Sep 2012 12:21:34 +1000 Subject: [PATCH] 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 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ui/status/power.js b/js/ui/status/power.js index ea7654956..1669734a2 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;