From 9aa3d864dc58091a1542c26cbb8b3193d2775228 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 24 May 2016 11:55:13 -0700 Subject: [PATCH] keyboard: split out a function We're going to use this in a later commit. https://bugzilla.gnome.org/show_bug.cgi?id=766826 --- js/ui/status/keyboard.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index d357258de..895b73c07 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -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); },