status/keyboard: Disregard the backwards flag for the popup switcher

This seems to cause more harm than good. It puzzles users looking at
the shortcuts list in g-c-c and it prevents otherwise valid shortcuts
like Shift+Hangul from working.

https://bugzilla.gnome.org/show_bug.cgi?id=695823
This commit is contained in:
Rui Matos 2013-04-03 01:14:08 +02:00
parent a8b7e559aa
commit 11bf65e2b4

View File

@ -293,11 +293,11 @@ const InputSourcePopup = new Lang.Class({
this._select(this._selectedIndex); this._select(this._selectedIndex);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, _ignored, action) {
if (action == this._action) if (action == this._action)
this._select(backwards ? this._previous() : this._next()); this._select(this._next());
else if (action == this._actionBackward) else if (action == this._actionBackward)
this._select(backwards ? this._next() : this._previous()); this._select(this._previous());
else if (keysym == Clutter.Left) else if (keysym == Clutter.Left)
this._select(this._previous()); this._select(this._previous());
else if (keysym == Clutter.Right) else if (keysym == Clutter.Right)
@ -367,14 +367,13 @@ const InputSourceIndicator = new Lang.Class({
this._keybindingAction = this._keybindingAction =
Main.wm.addKeybinding('switch-input-source', Main.wm.addKeybinding('switch-input-source',
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }), new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES, Meta.KeyBindingFlags.NONE,
Shell.KeyBindingMode.ALL, Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource)); Lang.bind(this, this._switchInputSource));
this._keybindingActionBackward = this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward', Main.wm.addKeybinding('switch-input-source-backward',
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }), new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES | Meta.KeyBindingFlags.NONE,
Meta.KeyBindingFlags.REVERSED,
Shell.KeyBindingMode.ALL, Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource)); Lang.bind(this, this._switchInputSource));
this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA }); this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA });
@ -472,7 +471,7 @@ const InputSourceIndicator = new Lang.Class({
let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward); let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward);
let modifiers = binding.get_modifiers(); let modifiers = binding.get_modifiers();
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK; let backwards = false; // Not using this
if (!popup.show(backwards, binding.get_name(), binding.get_mask())) if (!popup.show(backwards, binding.get_name(), binding.get_mask()))
popup.destroy(); popup.destroy();
}, },