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
@ -331,10 +331,7 @@ const SystemActions = GObject.registerClass({
|
|||||||
|
|
||||||
_updateHaveShutdown() {
|
_updateHaveShutdown() {
|
||||||
this._session.CanShutdownRemote((result, error) => {
|
this._session.CanShutdownRemote((result, error) => {
|
||||||
if (error)
|
this._canHavePowerOff = error ? false : result[0];
|
||||||
return;
|
|
||||||
|
|
||||||
this._canHavePowerOff = result[0];
|
|
||||||
this._updatePowerOff();
|
this._updatePowerOff();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user