Migrate to GSettings

Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
This commit is contained in:
Milan Bouchet-Valat
2010-05-05 23:05:42 +02:00
parent da4e24555b
commit 2799327c84
27 changed files with 369 additions and 886 deletions

View File

@ -1,6 +1,7 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Clutter = imports.gi.Clutter;
const GConf = imports.gi.GConf;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Pango = imports.gi.Pango;
@ -582,10 +583,10 @@ LookingGlass.prototype = {
vertical: true,
visible: false });
let gconf = Shell.GConf.get_default();
gconf.watch_directory('/desktop/gnome/interface');
gconf.connect('changed::/desktop/gnome/interface/monospace_font_name',
Lang.bind(this, this._updateFont));
let gconf = GConf.Client.get_default();
gconf.add_dir('/desktop/gnome/interface', GConf.ClientPreloadType.PRELOAD_NONE);
gconf.notify_add('/desktop/gnome/interface/monospace_font_name',
Lang.bind(this, this._updateFont));
this._updateFont();
Main.uiGroup.add_actor(this.actor);
@ -696,7 +697,7 @@ LookingGlass.prototype = {
},
_updateFont: function() {
let gconf = Shell.GConf.get_default();
let gconf = GConf.Client.get_default();
let fontName = gconf.get_string('/desktop/gnome/interface/monospace_font_name');
// This is mishandled by the scanner - should by Pango.FontDescription_from_string(fontName);
// https://bugzilla.gnome.org/show_bug.cgi?id=595889