GNOME Bugzilla – Bug 683080
power indicator is blank
Last modified: 2012-09-01 07:42:15 UTC
I have noticed a blank area in my status area that is apparently the power indicator (if I click on that blank space get a menu with power settings in it). In the past, on this desktop system the power indicator was completely hidden. I assume that is still the expected behaviour. Currently there is an empty actor and associated menu.
Created attachment 223023 [details] [review] statusArea: Power indicator is not hidden On a desktop system the power indicator does not get hidden correctly, this patch fixes the desktop case, however I don't have a laptop with 3.5 beta to test that.
Review of attachment 223023 [details] [review]: Sorry, your patch is wrong, as it hides the indicator on laptops with no primary (i.e. discharging) battery. More debugging is needed to find out if this is a shell bug or a gnome-settings-daemon bug. For example, could you post the output of gdbus introspect --session --dest org.gnome.SettingsDaemon --object-path /org/gnome/SettingsDaemon/Power --only-properties Thank you
Here is the output for that command. node /org/gnome/SettingsDaemon/Power { interface org.gnome.SettingsDaemon.Power { properties: readonly s Icon = ''; readonly s Tooltip = ''; }; };
ok, so the problem is in _syncIcon() then
Created attachment 223026 [details] [review] statusArea: Power indicator is not hidden On a desktop system the power indicator does not get hidden correctly, since a blank icon '' is returned instead of null.
Review of attachment 223026 [details] [review]: Given that DBus has no concept of NULL, I wonder if the original code ever worked?
Created attachment 223027 [details] [review] statusArea: Power indicator is not hidden On a desktop system the power indicator does not get hidden correctly, since a blank icon '' is returned instead of null.
missed you review magcius, my patch 223026 was broken logic.. but if dbus doesn’t know about null, then perhaps it should just be? let hasIcon = (icon != '');
(In reply to comment #8) > missed you review magcius, my patch 223026 [details] was broken logic.. but if dbus > doesn’t know about null, then perhaps it should just be? > > let hasIcon = (icon != ''); Yes, that's the correct code. (Previously, we had !icon, which works for null or '')
Created attachment 223115 [details] [review] I think this is a cleaner 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.
Review of attachment 223115 [details] [review]: Yeah that one looks good.
Comment on attachment 223115 [details] [review] I think this is a cleaner patch. Pushed as 87e021cd2