main: Move pref overrides to JS
We will allow to use mode-specific overrides; in preparation for that, move the code so that we only override preferences after initializing the session mode. https://bugzilla.gnome.org/show_bug.cgi?id=701717
This commit is contained in:
@ -108,6 +108,7 @@ function start() {
|
||||
|
||||
function _sessionsLoaded() {
|
||||
sessionMode.connect('updated', _sessionUpdated);
|
||||
_initializePrefs();
|
||||
_initializeUI();
|
||||
|
||||
shellDBusService = new ShellDBus.GnomeShell();
|
||||
@ -116,6 +117,13 @@ function _sessionsLoaded() {
|
||||
_sessionUpdated();
|
||||
}
|
||||
|
||||
function _initializePrefs() {
|
||||
let overridesSchema = 'org.gnome.shell.overrides';
|
||||
let keys = new Gio.Settings({ schema: overridesSchema }).list_keys();
|
||||
for (let i = 0; i < keys.length; i++)
|
||||
Meta.prefs_override_preference_schema(keys[i], overridesSchema);
|
||||
}
|
||||
|
||||
function _initializeUI() {
|
||||
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
|
||||
// also initialize ShellAppSystem first. ShellAppSystem
|
||||
|
Reference in New Issue
Block a user