keyboard: split out a function
We're going to use this in a later commit. https://bugzilla.gnome.org/show_bug.cgi?id=766826
This commit is contained in:
parent
2425b11df6
commit
9aa3d864dc
@ -261,9 +261,9 @@ const InputSourceSessionSettings = new Lang.Class({
|
|||||||
this._settings.connect('changed::' + this._KEY_PER_WINDOW, Lang.bind(this, this._emitPerWindowChanged));
|
this._settings.connect('changed::' + this._KEY_PER_WINDOW, Lang.bind(this, this._emitPerWindowChanged));
|
||||||
},
|
},
|
||||||
|
|
||||||
get inputSources() {
|
_getSourcesList: function(key) {
|
||||||
let sourcesList = [];
|
let sourcesList = [];
|
||||||
let sources = this._settings.get_value(this._KEY_INPUT_SOURCES);
|
let sources = this._settings.get_value(key);
|
||||||
let nSources = sources.n_children();
|
let nSources = sources.n_children();
|
||||||
|
|
||||||
for (let i = 0; i < nSources; i++) {
|
for (let i = 0; i < nSources; i++) {
|
||||||
@ -273,6 +273,10 @@ const InputSourceSessionSettings = new Lang.Class({
|
|||||||
return sourcesList;
|
return sourcesList;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get inputSources() {
|
||||||
|
return this._getSourcesList(this._KEY_INPUT_SOURCES);
|
||||||
|
},
|
||||||
|
|
||||||
get keyboardOptions() {
|
get keyboardOptions() {
|
||||||
return this._settings.get_strv(this._KEY_KEYBOARD_OPTIONS);
|
return this._settings.get_strv(this._KEY_KEYBOARD_OPTIONS);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user