After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686247 - loginScreen: Add support for 'disable-restart-buttons'
loginScreen: Add support for 'disable-restart-buttons'
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
unspecified
Other All
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-16 20:04 UTC by Florian Müllner
Modified: 2012-10-16 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginScreen: Add support for 'disable-restart-buttons' (1.96 KB, patch)
2012-10-16 20:04 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2012-10-16 20:04:10 UTC
See patch.

Originally filed as https://bugzilla.redhat.com/show_bug.cgi?id=843568
Comment 1 Florian Müllner 2012-10-16 20:04:13 UTC
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.
Comment 2 Florian Müllner 2012-10-16 20:11:14 UTC
Alternatively we might leave 'suspend' unaffected by the setting and set _haveShutdown and _haveRestart accordingly.
Comment 3 Ray Strode [halfline] 2012-10-16 20:47:46 UTC
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.
Comment 4 Florian Müllner 2012-10-16 20:58:51 UTC
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.