[gnome-shell] Background: allow passing the settings schema from outside
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Background: allow passing the settings schema from outside
- Date: Tue, 20 Aug 2013 12:12:47 +0000 (UTC)
commit 4413f816e6016e3759e7e0b2d8188ee62aa1ab6a
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Aug 20 00:48:56 2013 +0200
Background: allow passing the settings schema from outside
This way it is possible to use different settings for different
backgrounds.
https://bugzilla.gnome.org/show_bug.cgi?id=688210
js/ui/background.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 1d9ab7c..246060a 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -295,14 +295,15 @@ const Background = new Lang.Class({
_init: function(params) {
params = Params.parse(params, { monitorIndex: 0,
layoutManager: Main.layoutManager,
- effects: Meta.BackgroundEffects.NONE });
+ effects: Meta.BackgroundEffects.NONE,
+ settings: null });
this.actor = new Meta.BackgroundGroup();
this.actor._delegate = this;
this._destroySignalId = this.actor.connect('destroy',
Lang.bind(this, this._destroy));
- this._settings = new Gio.Settings({ schema: BACKGROUND_SCHEMA });
+ this._settings = params.settings;
this._monitorIndex = params.monitorIndex;
this._layoutManager = params.layoutManager;
this._effects = params.effects;
@@ -716,8 +717,10 @@ const BackgroundManager = new Lang.Class({
layoutManager: Main.layoutManager,
monitorIndex: null,
effects: Meta.BackgroundEffects.NONE,
- controlPosition: true });
+ controlPosition: true,
+ settingsSchema: BACKGROUND_SCHEMA });
+ this._settings = new Gio.Settings({ schema: params.settingsSchema });
this._container = params.container;
this._layoutManager = params.layoutManager;
this._effects = params.effects;
@@ -776,7 +779,8 @@ const BackgroundManager = new Lang.Class({
_createBackground: function() {
let background = new Background({ monitorIndex: this._monitorIndex,
layoutManager: this._layoutManager,
- effects: this._effects });
+ effects: this._effects,
+ settings: this._settings });
this._container.add_child(background.actor);
let monitor = this._layoutManager.monitors[this._monitorIndex];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]