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 9c222c7e5c
commit 6c2f3d1d17
2 changed files with 8 additions and 20 deletions

View File

@ -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