diff --git a/js/gdm/powerMenu.js b/js/gdm/powerMenu.js index 3804ec568..613a89607 100644 --- a/js/gdm/powerMenu.js +++ b/js/gdm/powerMenu.js @@ -70,7 +70,7 @@ const PowerMenuButton = new Lang.Class({ this._systemdLoginManager.CanPowerOffRemote(Lang.bind(this, function(result, error) { if (!error) - this._haveShutdown = result != 'no'; + this._haveShutdown = result[0] != 'no'; else this._haveShutdown = false; @@ -81,7 +81,7 @@ const PowerMenuButton = new Lang.Class({ this._consoleKitManager.CanStopRemote(Lang.bind(this, function(result, error) { if (!error) - this._haveShutdown = result; + this._haveShutdown = result[0]; else this._haveShutdown = false; @@ -97,7 +97,7 @@ const PowerMenuButton = new Lang.Class({ this._systemdLoginManager.CanRebootRemote(Lang.bind(this, function(result, error) { if (!error) - this._haveRestart = result != 'no'; + this._haveRestart = result[0] != 'no'; else this._haveRestart = false; @@ -108,7 +108,7 @@ const PowerMenuButton = new Lang.Class({ this._consoleKitManager.CanRestartRemote(Lang.bind(this, function(result, error) { if (!error) - this._haveRestart = result; + this._haveRestart = result[0]; else this._haveRestart = false; diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 8e9c3e703..41bf99889 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -584,7 +584,7 @@ const UserMenuButton = new Lang.Class({ this._session.CanShutdownRemote(Lang.bind(this, function(result, error) { if (!error) { - this._haveShutdown = result; + this._haveShutdown = result[0]; this._updateSuspendOrPowerOff(); } }));