[gnome-shell/gnome-41] systemActions: Disable power-off if querying support fails
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-41] systemActions: Disable power-off if querying support fails
- Date: Thu, 11 Aug 2022 13:03:55 +0000 (UTC)
commit 9c8194bee59b2ab542157b026805b3b61452d090
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 9 14:01:17 2022 +0200
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>
(cherry picked from commit 415349c8526ca4485f6bd37be7c19579acb4c8d8)
js/misc/systemActions.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js
index 10cab9a9e2..419e642bee 100644
--- a/js/misc/systemActions.js
+++ b/js/misc/systemActions.js
@@ -318,10 +318,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();
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]