GNOME Bugzilla – Bug 686247
loginScreen: Add support for 'disable-restart-buttons'
Last modified: 2012-10-16 20:58:55 UTC
See patch. Originally filed as https://bugzilla.redhat.com/show_bug.cgi?id=843568
Created attachment 226586 [details] [review] loginScreen: Add support for 'disable-restart-buttons' GDM's GSettings schema contains a 'disable-restart-buttons' key that currently is only supported by the fallback greeter. Implement support in the shell greeter as well.
Alternatively we might leave 'suspend' unaffected by the setting and set _haveShutdown and _haveRestart accordingly.
Review of attachment 226586 [details] [review]: cool. ::: js/gdm/powerMenu.js @@ +28,3 @@ const PopupMenu = imports.ui.popupMenu; +const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; I don't care much either way, but loginDialog.js uses GdmUtil.LOGIN_SCREEN_SCHEMA so maybe we should in the file too, too. @@ +66,3 @@ _updateVisibility: function() { let shouldBeVisible = (this._haveSuspend || this._haveShutdown || this._haveRestart); + this.actor.visible = shouldBeVisible && !this._settings.get_boolean('disable-restart-buttons'); I think this is right. The fallback greeter hides suspend when disable-restart-buttons is enabled also.
Attachment 226586 [details] pushed as 86c85a7 - loginScreen: Add support for 'disable-restart-buttons' (In reply to comment #3) > Review of attachment 226586 [details] [review]: > ::: js/gdm/powerMenu.js > @@ +28,3 @@ > const PopupMenu = imports.ui.popupMenu; > > +const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; > > I don't care much either way, but loginDialog.js uses > GdmUtil.LOGIN_SCREEN_SCHEMA so maybe we should in the file too, too. Sure, sounds good to me - changed. > I think this is right. The fallback greeter hides suspend when > disable-restart-buttons is enabled also. Cool, let's leave it like this then.