[gnome-shell] main: Don't depend on GSystem unconditionally
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] main: Don't depend on GSystem unconditionally
- Date: Sat, 3 May 2014 21:55:05 +0000 (UTC)
commit 8c45e6fa43f49ffef0bf1839f08c1610adc706cc
Author: Florian Müllner <fmuellner gnome org>
Date: Sat May 3 20:57:49 2014 +0200
main: Don't depend on GSystem unconditionally
We only need GSystem when running under systemd. As libgsystem itself
has a hard dependency on systemd, only import it when actually needed
to keep working on systems where systemd is not available.
https://bugzilla.gnome.org/show_bug.cgi?id=728449
js/ui/main.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 1958abe..b596463 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -9,7 +9,6 @@ const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
-const GSystem = imports.gi.GSystem;
const Components = imports.ui.components;
const CtrlAltTab = imports.ui.ctrlAltTab;
@@ -214,6 +213,9 @@ function _initializeUI() {
screenShield.lockIfWasLocked();
}
if (LoginManager.haveSystemd() && sessionMode.currentMode === 'user') {
+ // Do not import globally to not depend
+ // on systemd on non-systemd systems.
+ let GSystem = imports.gi.GSystem;
GSystem.log_structured_print('GNOME Shell started at ' + _startDate,
['MESSAGE_ID=' +
GNOMESHELL_STARTED_MESSAGE_ID]);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]