mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
systemActions: Disable power-off if querying support fails
Treating failure as success is weird. It's also most likely wrong, as the most likely reason is that gnome-session isn't running. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2372>
This commit is contained in:
parent
2a3d409114
commit
415349c852
1 changed files with 1 additions and 4 deletions
|
|
@ -331,10 +331,7 @@ const SystemActions = GObject.registerClass({
|
|||
|
||||
_updateHaveShutdown() {
|
||||
this._session.CanShutdownRemote((result, error) => {
|
||||
if (error)
|
||||
return;
|
||||
|
||||
this._canHavePowerOff = result[0];
|
||||
this._canHavePowerOff = error ? false : result[0];
|
||||
this._updatePowerOff();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue