[gnome-shell] altTab: enable the switch_group keybinding action
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] altTab: enable the switch_group keybinding action
- Date: Tue, 15 Feb 2011 19:03:56 +0000 (UTC)
commit a047132a2f3c9073d6b8673b09fb91b5e3e2cb21
Author: Rui Matos <tiagomatos gmail com>
Date: Sat Jan 29 22:11:25 2011 +0000
altTab: enable the switch_group keybinding action
Allows the user to bring up the Alt+Tab popup with the current application's
window thumbnails selected.
https://bugzilla.gnome.org/show_bug.cgi?id=639341
js/ui/altTab.js | 13 +++++++++++--
js/ui/windowManager.js | 3 ++-
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 785263e..634742a 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -120,7 +120,7 @@ AltTabPopup.prototype = {
}
},
- show : function(backward) {
+ show : function(backward, switch_group) {
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ('');
@@ -145,7 +145,16 @@ AltTabPopup.prototype = {
this._appIcons = this._appSwitcher.icons;
// Make the initial selection
- if (this._appIcons.length == 1) {
+ if (switch_group) {
+ if (backward) {
+ this._select(0, this._appIcons[0].cachedWindows.length - 1);
+ } else {
+ if (this._appIcons[0].cachedWindows.length > 1)
+ this._select(0, 1);
+ else
+ this._select(0, 0);
+ }
+ } else if (this._appIcons.length == 1) {
if (!backward && this._appIcons[0].cachedWindows.length > 1) {
// For compatibility with the multi-app case below
this._select(0, 1, true);
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 328ccb6..d291b8d 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -116,6 +116,7 @@ WindowManager.prototype = {
this.setKeybindingHandler('switch_to_workspace_up', Lang.bind(this, this._showWorkspaceSwitcher));
this.setKeybindingHandler('switch_to_workspace_down', Lang.bind(this, this._showWorkspaceSwitcher));
this.setKeybindingHandler('switch_windows', Lang.bind(this, this._startAppSwitcher));
+ this.setKeybindingHandler('switch_group', Lang.bind(this, this._startAppSwitcher));
Main.overview.connect('showing', Lang.bind(this, function() {
for (let i = 0; i < this._dimmedWindows.length; i++)
@@ -520,7 +521,7 @@ WindowManager.prototype = {
let tabPopup = new AltTab.AltTabPopup();
- if (!tabPopup.show(backwards))
+ if (!tabPopup.show(backwards, binding == 'switch_group'))
tabPopup.destroy();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]