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:
Cosimo Cecchi 2016-05-24 11:55:13 -07:00
parent 2425b11df6
commit 9aa3d864dc

View File

@ -261,9 +261,9 @@ const InputSourceSessionSettings = new Lang.Class({
this._settings.connect('changed::' + this._KEY_PER_WINDOW, Lang.bind(this, this._emitPerWindowChanged));
},
get inputSources() {
_getSourcesList: function(key) {
let sourcesList = [];
let sources = this._settings.get_value(this._KEY_INPUT_SOURCES);
let sources = this._settings.get_value(key);
let nSources = sources.n_children();
for (let i = 0; i < nSources; i++) {
@ -273,6 +273,10 @@ const InputSourceSessionSettings = new Lang.Class({
return sourcesList;
},
get inputSources() {
return this._getSourcesList(this._KEY_INPUT_SOURCES);
},
get keyboardOptions() {
return this._settings.get_strv(this._KEY_KEYBOARD_OPTIONS);
},