keyboard: Use JS style for current page variable

We should use camelCase for _currentPage.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/540
This commit is contained in:
Marco Trevisan (Treviño) 2019-05-09 14:37:20 -05:00
parent d84bbb8770
commit 8ad33d8752

View File

@ -1162,7 +1162,7 @@ var Keyboard = class Keyboard {
this._keyboardController = new KeyboardController(); this._keyboardController = new KeyboardController();
this._groups = {}; this._groups = {};
this._current_page = null; this._currentPage = null;
this._suggestions = new Suggestions(); this._suggestions = new Suggestions();
this.actor.add(this._suggestions.actor, this.actor.add(this._suggestions.actor,
@ -1355,7 +1355,7 @@ var Keyboard = class Keyboard {
} else if (switchToLevel == 1) { } else if (switchToLevel == 1) {
extraButton.connect('long-press', () => { extraButton.connect('long-press', () => {
this._latched = true; this._latched = true;
this._setCurrentLevelLatched(this._current_page, this._latched); this._setCurrentLevelLatched(this._currentPage, this._latched);
}); });
} }
@ -1382,8 +1382,8 @@ var Keyboard = class Keyboard {
} }
_updateCurrentPageVisible() { _updateCurrentPageVisible() {
if (this._current_page) if (this._currentPage)
this._current_page.visible = !this._emojiActive && !this._keypadVisible; this._currentPage.visible = !this._emojiActive && !this._keypadVisible;
} }
_setEmojiActive(active) { _setEmojiActive(active) {
@ -1442,7 +1442,7 @@ var Keyboard = class Keyboard {
_getGridSlots() { _getGridSlots() {
let numOfHorizSlots = 0, numOfVertSlots; let numOfHorizSlots = 0, numOfVertSlots;
let rows = this._current_page.get_children(); let rows = this._currentPage.get_children();
numOfVertSlots = rows.length; numOfVertSlots = rows.length;
for (let i = 0; i < rows.length; ++i) { for (let i = 0; i < rows.length; ++i) {
@ -1521,21 +1521,21 @@ var Keyboard = class Keyboard {
let layers = this._groups[activeGroupName]; let layers = this._groups[activeGroupName];
let currentPage = layers[activeLevel]; let currentPage = layers[activeLevel];
if (this._current_page == currentPage) { if (this._currentPage == currentPage) {
this._updateCurrentPageVisible(); this._updateCurrentPageVisible();
return; return;
} }
if (this._current_page != null) { if (this._currentPage != null) {
this._setCurrentLevelLatched(this._current_page, false); this._setCurrentLevelLatched(this._currentPage, false);
this._current_page.disconnect(this._current_page._destroyID); this._currentPage.disconnect(this._currentPage._destroyID);
this._current_page.hide(); this._currentPage.hide();
delete this._current_page._destroyID; delete this._currentPage._destroyID;
} }
this._current_page = currentPage; this._currentPage = currentPage;
this._current_page._destroyID = this._current_page.connect('destroy', () => { this._currentPage._destroyID = this._currentPage.connect('destroy', () => {
this._current_page = null; this._currentPage = null;
}); });
this._updateCurrentPageVisible(); this._updateCurrentPageVisible();
} }