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:
Florian Müllner
2013-06-06 16:39:23 +02:00
parent fbf1ee8a01
commit bcede26d77
2 changed files with 7 additions and 20 deletions

View File

@ -106,6 +106,7 @@ function start() {
function _sessionsLoaded() {
sessionMode.connect('updated', _sessionUpdated);
_initializePrefs();
_initializeUI();
shellDBusService = new ShellDBus.GnomeShell();
@ -114,6 +115,12 @@ function _sessionsLoaded() {
_sessionUpdated();
}
function _initializePrefs() {
let keys = new Gio.Settings({ schema: OVERRIDES_SCHEMA }).list_keys();
for (let i = 0; i < keys.length; i++)
Meta.prefs_override_preference_schema (keys[i], OVERRIDES_SCHEMA);
}
function _initializeUI() {
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
// also initialize ShellAppSystem first. ShellAppSystem