[gnome-shell] a11y-status: Use GSettings to access the magnifier
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] a11y-status: Use GSettings to access the magnifier
- Date: Wed, 1 Dec 2010 15:39:33 +0000 (UTC)
commit 24669e3ba7195dd30922e2853333d8dea4f598a5
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Nov 30 18:32:06 2010 +0100
a11y-status: Use GSettings to access the magnifier
The magnifier should be enabled/disabled via the appropriate
GSettings key - otherwise the setting gets out of sync with the
actual state of the magnifier.
https://bugzilla.gnome.org/show_bug.cgi?id=636151
js/ui/status/accessibility.js | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js
index a1e9ee4..9fd87c3 100644
--- a/js/ui/status/accessibility.js
+++ b/js/ui/status/accessibility.js
@@ -10,7 +10,6 @@ const Shell = imports.gi.Shell;
const Signals = imports.signals;
const St = imports.gi.St;
-const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@@ -23,6 +22,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.accessibility.magnifier';
const AT_SCREEN_KEYBOARD_SCHEMA = "org.gnome.desktop.default-applications.at.mobility";
const AT_SCREEN_READER_SCHEMA = "org.gnome.desktop.default-applications.at.visual";
@@ -79,7 +79,7 @@ ATIndicator.prototype = {
let highContrast = this._buildHCItem();
this.menu.addMenuItem(highContrast);
- let magnifier = this._buildMagItem();
+ let magnifier = this._buildItem(_("Zoom"), MAGNIFIER_SCHEMA, 'show-magnifier');
this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem();
@@ -219,18 +219,6 @@ ATIndicator.prototype = {
return widget;
},
- _buildMagItem: function() {
- let mag = Main.magnifier;
- let widget = this._buildItemExtended(_("Zoom"),
- mag.isActive(),
- true,
- Lang.bind(mag, mag.setActive));
- mag.connect('active-changed', function(magnifier, active) {
- widget.setToggleState(active);
- });
- return widget;
- },
-
_keyChanged: function() {
this.emit('gconf-changed');
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]