[gnome-shell-extensions/gnome-3-2] alternate-tab: use 3.2 binding names



commit 85620c0adbd7c667de93a3a598375be77e037b1a
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Dec 11 15:36:17 2011 +0100

    alternate-tab: use 3.2 binding names
    
    In 3.2 branch, the GSettings migration hasn't happened yet, so
    we need to use underscores in binding names.
    Also, uncomment some code that handles keyPressEvent, as the core
    shell code causes crashes in all_thumbnails, sometimes.

 extensions/alternate-tab/extension.js |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js
index 2001636..a53b396 100644
--- a/extensions/alternate-tab/extension.js
+++ b/extensions/alternate-tab/extension.js
@@ -10,6 +10,7 @@ const Clutter = imports.gi.Clutter;
 const Gdk = imports.gi.Gdk;
 const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Main = imports.ui.main;
 const Mainloop = imports.mainloop;
@@ -462,7 +463,6 @@ AltTabPopup2.prototype = {
 	return true
     },
 
-/*
     _keyPressEvent : function(actor, event) {
         let keysym = event.get_key_symbol();
         let shift = (Shell.get_event_state(event) & Clutter.ModifierType.SHIFT_MASK);
@@ -508,7 +508,6 @@ AltTabPopup2.prototype = {
 
         return true;
     },
-*/
 
     _sortWindows : function(win1,win2) {
         let t1 = win1.get_user_time();
@@ -613,15 +612,15 @@ function doAltTab(shellwm, binding, mask, window, backwards) {
 }
 
 function enable() {
-    Main.wm.setKeybindingHandler('switch-windows', doAltTab);
-    Main.wm.setKeybindingHandler('switch-group', doAltTab);
-    Main.wm.setKeybindingHandler('switch-windows-backward', doAltTab);
-    Main.wm.setKeybindingHandler('switch-group-backward', doAltTab);
+    Main.wm.setKeybindingHandler('switch_windows', doAltTab);
+    Main.wm.setKeybindingHandler('switch_group', doAltTab);
+    Main.wm.setKeybindingHandler('switch_windows_backward', doAltTab);
+    Main.wm.setKeybindingHandler('switch_group_backward', doAltTab);
 }
 
 function disable() {
-    Main.wm.setKeybindingHandler('switch-windows', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
-    Main.wm.setKeybindingHandler('switch-group', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
-    Main.wm.setKeybindingHandler('switch-windows-backward', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
-    Main.wm.setKeybindingHandler('switch-group-backward', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
+    Main.wm.setKeybindingHandler('switch_windows', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
+    Main.wm.setKeybindingHandler('switch_group', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
+    Main.wm.setKeybindingHandler('switch_windows_backward', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
+    Main.wm.setKeybindingHandler('switch_group_backward', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
 }



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