[gnome-shell] ibusCandidatePopup: Fix default candidate index labels



commit 39c210abed3105bf9d79402a451155b4bf6c344a
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Jul 7 14:30:40 2014 +0200

    ibusCandidatePopup: Fix default candidate index labels
    
    The first 10 candidates are supposed to be shortcutted with the
    keyboard keys 1 through 0 so the 10th index should be '0', not 'a'.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702944

 js/ui/ibusCandidatePopup.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js
index ded7cb8..0f7c3b2 100644
--- a/js/ui/ibusCandidatePopup.js
+++ b/js/ui/ibusCandidatePopup.js
@@ -11,6 +11,9 @@ const Main = imports.ui.main;
 
 const MAX_CANDIDATES_PER_PAGE = 16;
 
+const DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
+                               '9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
+
 const CandidateArea = new Lang.Class({
     Name: 'CandidateArea',
 
@@ -89,7 +92,7 @@ const CandidateArea = new Lang.Class({
             if (!visible)
                 continue;
 
-            box._indexLabel.text = ((indexes && indexes[i]) ? indexes[i] : '%x'.format(i + 1));
+            box._indexLabel.text = ((indexes && indexes[i]) ? indexes[i] : DEFAULT_INDEX_LABELS[i]);
             box._candidateLabel.text = candidates[i];
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]