keyboard: switch to using the correct gsettings key for enable/disable
https://bugzilla.gnome.org/show_bug.cgi?id=612662
This commit is contained in:
parent
45d8550044
commit
554ad4ef05
@ -69,13 +69,6 @@
|
|||||||
|
|
||||||
<schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
|
<schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
|
||||||
gettext-domain="@GETTEXT_PACKAGE@">
|
gettext-domain="@GETTEXT_PACKAGE@">
|
||||||
<key name="show-keyboard" type="b">
|
|
||||||
<default>false</default>
|
|
||||||
<_summary>Show the onscreen keyboard</_summary>
|
|
||||||
<_description>
|
|
||||||
If true, display onscreen keyboard.
|
|
||||||
</_description>
|
|
||||||
</key>
|
|
||||||
<key name="keyboard-type" type="s">
|
<key name="keyboard-type" type="s">
|
||||||
<default>'touch'</default>
|
<default>'touch'</default>
|
||||||
<_summary>Which keyboard to use</_summary>
|
<_summary>Which keyboard to use</_summary>
|
||||||
|
@ -15,9 +15,11 @@ const Main = imports.ui.main;
|
|||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
|
|
||||||
const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
|
const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
|
||||||
const SHOW_KEYBOARD = 'show-keyboard';
|
|
||||||
const KEYBOARD_TYPE = 'keyboard-type';
|
const KEYBOARD_TYPE = 'keyboard-type';
|
||||||
|
|
||||||
|
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
|
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
||||||
|
|
||||||
// Key constants taken from Antler
|
// Key constants taken from Antler
|
||||||
// FIXME: ought to be moved into libcaribou
|
// FIXME: ought to be moved into libcaribou
|
||||||
const PRETTY_KEYS = {
|
const PRETTY_KEYS = {
|
||||||
@ -207,6 +209,8 @@ Keyboard.prototype = {
|
|||||||
|
|
||||||
this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA });
|
this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA });
|
||||||
this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
|
this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
|
||||||
|
this._a11yApplicationsSettings = new Gio.Settings({ schema: A11Y_APPLICATIONS_SCHEMA });
|
||||||
|
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._settingsChanged));
|
||||||
this._settingsChanged();
|
this._settingsChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -215,7 +219,7 @@ Keyboard.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_settingsChanged: function () {
|
_settingsChanged: function () {
|
||||||
this._enableKeyboard = this._keyboardSettings.get_boolean(SHOW_KEYBOARD);
|
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
|
||||||
if (!this._enableKeyboard && !this._keyboard)
|
if (!this._enableKeyboard && !this._keyboard)
|
||||||
return;
|
return;
|
||||||
if (this._enableKeyboard && this._keyboard &&
|
if (this._enableKeyboard && this._keyboard &&
|
||||||
|
@ -68,9 +68,9 @@ ATIndicator.prototype = {
|
|||||||
// 'screen-reader-enabled');
|
// 'screen-reader-enabled');
|
||||||
// this.menu.addMenuItem(screenReader);
|
// this.menu.addMenuItem(screenReader);
|
||||||
|
|
||||||
// let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
|
let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
|
||||||
// 'screen-keyboard-enabled');
|
'screen-keyboard-enabled');
|
||||||
// this.menu.addMenuItem(screenKeyboard);
|
this.menu.addMenuItem(screenKeyboard);
|
||||||
|
|
||||||
let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL);
|
let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL);
|
||||||
this.menu.addMenuItem(visualBell);
|
this.menu.addMenuItem(visualBell);
|
||||||
|
Loading…
Reference in New Issue
Block a user