[gnome-shell/wip/is-switch-fixes: 3/4] status/keyboard: Allow switching input source in the message tray
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/is-switch-fixes: 3/4] status/keyboard: Allow switching input source in the message tray
- Date: Fri, 5 Apr 2013 16:15:41 +0000 (UTC)
commit a8b7e559aa4fe75645c06f3c0209f3fb252ea3cd
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Mar 29 23:19:02 2013 +0100
status/keyboard: Allow switching input source in the message tray
We still can't show a popup switcher in the message tray but we can at
least degrade gracefully and advance to the next input source.
https://bugzilla.gnome.org/show_bug.cgi?id=697009
js/ui/status/keyboard.js | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index a0503ac..790b6d4 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -368,14 +368,14 @@ const InputSourceIndicator = new Lang.Class({
Main.wm.addKeybinding('switch-input-source',
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES,
- Shell.KeyBindingMode.ALL & ~Shell.KeyBindingMode.MESSAGE_TRAY,
+ Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource));
this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward',
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES |
Meta.KeyBindingFlags.REVERSED,
- Shell.KeyBindingMode.ALL & ~Shell.KeyBindingMode.MESSAGE_TRAY,
+ Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource));
this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA });
this._settings.connect('changed::' + KEY_CURRENT_INPUT_SOURCE, Lang.bind(this,
this._currentInputSourceChanged));
@@ -460,6 +460,16 @@ const InputSourceIndicator = new Lang.Class({
if (this._mruSources.length < 2)
return;
+ // HACK: Fall back on simple input source switching since we
+ // can't show a popup switcher while the message tray is up
+ // without considerable work to consolidate the usage of
+ // pushModal/popModal and grabHelper. See
+ // https://bugzilla.gnome.org/show_bug.cgi?id=695143 .
+ if (Main.keybindingMode == Shell.KeyBindingMode.MESSAGE_TRAY) {
+ this._modifiersSwitcher();
+ 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]