[gnome-shell] keyboard: split out a function
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: split out a function
- Date: Fri, 27 May 2016 17:48:22 +0000 (UTC)
commit 9aa3d864dc58091a1542c26cbb8b3193d2775228
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Tue May 24 11:55:13 2016 -0700
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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index d357258..895b73c 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);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]