[gnome-shell] status/keyboard: Don't show the switcher with less than 2 items



commit 7e1b4692e29f728af94a7ea9b4962255d45914ed
Author: Rui Matos <tiagomatos gmail com>
Date:   Sat Mar 2 16:51:00 2013 +0100

    status/keyboard: Don't show the switcher with less than 2 items
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695000

 js/ui/status/keyboard.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 3a9fc1c..eb668fa 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -398,6 +398,9 @@ const InputSourceIndicator = new Lang.Class({
     },
 
     _switchInputSource: function(display, screen, window, binding) {
+        if (this._mruSources.length < 2)
+            return;
+
         let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, 
this._keybindingActionBackward);
         let modifiers = binding.get_modifiers();
         let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;


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