GNOME Bugzilla – Bug 702300
alternative status menu: hide hibernate option when hibernate is disabled
Last modified: 2013-07-04 14:52:00 UTC
Ubuntu 13.10 Alpha with logind and gnome-shell and -extensions 3.8. Ubuntu has disabled hibernate by default. See the .pkla[1]; sudo pm-hibernate still works though[2]. When I enable the alternative status menu, Hibernate shows up as an option in the user menu. Clicking Hibernate does nothing. What should happen: Hibernate should not show up when it has been disabled. I also reported this to Ubuntu at http://pad.lv/1191181 [1] https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/policykit-desktop-privileges/saucy/view/head:/com.ubuntu.desktop.pkla [2] https://help.ubuntu.com/stable/ubuntu-help/power-hibernate.html
Uhm... the ConsoleKit paths for suspend and hibernate were removed before 3.8. Is this a downstream patch? Or is ubuntu using logind in 13.04 too? We ask logind CanHibernate, it should return false if polkit would say no.
Created attachment 248393 [details] [review] alternative-status-menu: unpack the result of the CanHibernate The DBus call yields a GVariant, which we need to unpack to obtain the JS value to compare.