[gnome-shell] gdm: Only create the Manager we're going to use
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] gdm: Only create the Manager we're going to use
- Date: Sun, 18 Mar 2012 10:55:22 +0000 (UTC)
commit c7182589d299e48d2e86ec8bc64eac95e7d441ab
Author: Jan Alexander Steffens (heftig) <jan steffens gmail com>
Date: Fri Mar 16 17:07:47 2012 +0100
gdm: Only create the Manager we're going to use
Otherwise gnome-shell crashes when systemd is installed but not in use,
because bus activation of logind fails.
https://bugzilla.gnome.org/show_bug.cgi?id=672240
js/gdm/powerMenu.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/powerMenu.js b/js/gdm/powerMenu.js
index 59ebc42..32edccd 100644
--- a/js/gdm/powerMenu.js
+++ b/js/gdm/powerMenu.js
@@ -33,10 +33,13 @@ const PowerMenuButton = new Lang.Class({
_init: function() {
this.parent('system-shutdown', null);
- this._consoleKitManager = new ConsoleKit.ConsoleKitManager();
- this._systemdLoginManager = new Systemd.SystemdLoginManager();
this._upClient = new UPowerGlib.Client();
+ if (Systemd.haveSystemd())
+ this._systemdLoginManager = new Systemd.SystemdLoginManager();
+ else
+ this._consoleKitManager = new ConsoleKit.ConsoleKitManager();
+
this._createSubMenu();
this._upClient.connect('notify::can-suspend',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]