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
This commit is contained in:
parent
9504d21297
commit
8c45e6fa43
@ -9,7 +9,6 @@ const Mainloop = imports.mainloop;
|
|||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const GSystem = imports.gi.GSystem;
|
|
||||||
|
|
||||||
const Components = imports.ui.components;
|
const Components = imports.ui.components;
|
||||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||||
@ -214,6 +213,9 @@ function _initializeUI() {
|
|||||||
screenShield.lockIfWasLocked();
|
screenShield.lockIfWasLocked();
|
||||||
}
|
}
|
||||||
if (LoginManager.haveSystemd() && sessionMode.currentMode === 'user') {
|
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,
|
GSystem.log_structured_print('GNOME Shell started at ' + _startDate,
|
||||||
['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]);
|
['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user