[gnome-shell] CandidateArea: make setOrientation() public
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] CandidateArea: make setOrientation() public
- Date: Thu, 14 Feb 2013 23:34:31 +0000 (UTC)
commit 235ec7cb2ec982379060cc0a580d0e45180178b5
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Feb 14 23:37:35 2013 +0100
CandidateArea: make setOrientation() public
setCandidates() has too many arguments and setting the orientation
isn't particularly related with it. It might also be useful to switch
orientation without changing the candidates.
https://bugzilla.gnome.org/show_bug.cgi?id=691902
js/ui/ibusCandidatePopup.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js
index d9bb770..bfebf16 100644
--- a/js/ui/ibusCandidatePopup.js
+++ b/js/ui/ibusCandidatePopup.js
@@ -51,7 +51,7 @@ const CandidateArea = new Lang.Class({
this._cursorPosition = 0;
},
- _setOrientation: function(orientation) {
+ setOrientation: function(orientation) {
if (this._orientation == orientation)
return;
@@ -72,9 +72,7 @@ const CandidateArea = new Lang.Class({
}
},
- setCandidates: function(indexes, candidates, orientation, cursorPosition, cursorVisible) {
- this._setOrientation(orientation);
-
+ setCandidates: function(indexes, candidates, cursorPosition, cursorVisible) {
for (let i = 0; i < MAX_CANDIDATES_PER_PAGE; ++i) {
let visible = i < candidates.length;
let box = this._candidateBoxes[i];
@@ -215,9 +213,9 @@ const CandidatePopup = new Lang.Class({
this._candidateArea.setCandidates(indexes,
candidates,
- lookupTable.get_orientation(),
cursorPos % pageSize,
lookupTable.is_cursor_visible());
+ this._candidateArea.setOrientation(lookupTable.get_orientation());
this._candidateArea.updateButtons(lookupTable.is_round(), page, nPages);
}));
panelService.connect('show-lookup-table',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]