[gnome-shell] magnifier: Adjust for removal of 'show-magnifier' key



commit 3631983de5f1dd3fc7d3477b8a419b28ce19f8b3
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 17 16:05:22 2011 +0100

    magnifier: Adjust for removal of 'show-magnifier' key
    
    gsettings-desktop-schemas had two conflicting settings for showing
    the magnifier: 'show-magnifier' in org.gnome.desktop.a11y.magnifier
    and 'screen-magnifier-enabled' in org.gnome.desktop.a11y.applications.
    The former has been removed in favor of the latter, so adjust to this
    change.

 js/ui/magnifier.js            |   16 ++++++++++------
 js/ui/status/accessibility.js |    5 +++--
 2 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 935d849..33d05a8 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -33,7 +33,10 @@ const MOUSE_POLL_FREQUENCY = 50;
 const CROSSHAIRS_CLIP_SIZE = [100, 100];
 
 // Settings
-const SHOW_KEY                  = 'show-magnifier';
+const APPLICATIONS_SCHEMA       = 'org.gnome.desktop.a11y.applications';
+const SHOW_KEY                  = 'screen-magnifier-enabled';
+
+const MAGNIFIER_SCHEMA          = 'org.gnome.desktop.a11y.magnifier';
 const SCREEN_POSITION_KEY       = 'screen-position';
 const MAG_FACTOR_KEY            = 'mag-factor';
 const LENS_MODE_KEY             = 'lens-mode';
@@ -438,7 +441,8 @@ Magnifier.prototype = {
     },
 
     _settingsInit: function(zoomRegion) {
-        this._settings = new Gio.Settings({ schema: 'org.gnome.desktop.a11y.magnifier' });
+        this._appSettings = new Gio.Settings({ schema: APPLICATIONS_SCHEMA });
+        this._settings = new Gio.Settings({ schema: MAGNIFIER_SCHEMA });
 
         if (zoomRegion) {
             // Mag factor is accurate to two decimal places.
@@ -462,9 +466,9 @@ Magnifier.prototype = {
         this.addCrosshairs();
         this.setCrosshairsVisible(showCrosshairs);
 
-        this._settings.connect('changed::' + SHOW_KEY,
-                               Lang.bind(this, function() {
-            this.setActive(this._settings.get_boolean(SHOW_KEY));
+        this._appSettings.connect('changed::' + SHOW_KEY,
+                                  Lang.bind(this, function() {
+            this.setActive(this._appSettings.get_boolean(SHOW_KEY));
         }));
 
         this._settings.connect('changed::' + SCREEN_POSITION_KEY,
@@ -508,7 +512,7 @@ Magnifier.prototype = {
             this.setCrosshairsClip(this._settings.get_boolean(CROSS_HAIRS_CLIP_KEY));
         }));
 
-        return this._settings.get_boolean(SHOW_KEY);
+        return this._appSettings.get_boolean(SHOW_KEY);
    },
 
     _updateScreenPosition: function() {
diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js
index b6c7b08..c07bf8d 100644
--- a/js/ui/status/accessibility.js
+++ b/js/ui/status/accessibility.js
@@ -23,7 +23,7 @@ const KEY_BOUNCE_KEYS_ENABLED = 'bouncekeys-enable';
 const KEY_SLOW_KEYS_ENABLED   = 'slowkeys-enable';
 const KEY_MOUSE_KEYS_ENABLED  = 'mousekeys-enable';
 
-const MAGNIFIER_SCHEMA = 'org.gnome.desktop.a11y.magnifier';
+const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
 const AT_SCREEN_KEYBOARD_SCHEMA = 'org.gnome.desktop.default-applications.at.mobility';
 const AT_SCREEN_READER_SCHEMA   = 'org.gnome.desktop.default-applications.at.visual';
 
@@ -80,7 +80,8 @@ ATIndicator.prototype = {
         let highContrast = this._buildHCItem();
         this.menu.addMenuItem(highContrast);
 
-        let magnifier = this._buildItem(_("Zoom"), MAGNIFIER_SCHEMA, 'show-magnifier');
+        let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA,
+                                                   'screen-magnifier-enabled');
         this.menu.addMenuItem(magnifier);
 
         let textZoom = this._buildFontItem();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]