[gnome-shell/wip/media-keys: 2/3] Prefix keybinding names with 'internal-keybinding-'



commit d886dc17e1f14adf7bea8f9f20433e873923c82c
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Nov 10 16:28:58 2012 +0100

    Prefix keybinding names with 'internal-keybinding-'
    
    This is what mutter does internally now, to disambiguate them with
    custom keybindings introduced with display.add_keybinding().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=613543

 js/ui/altTab.js        |    6 +++---
 js/ui/main.js          |    4 ++--
 js/ui/windowManager.js |   28 ++++++++++++++--------------
 3 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index f8fdb00..a3e9b5a 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -199,7 +199,7 @@ const AltTabPopup = new Lang.Class({
         this.actor.get_allocation_box();
 
         // Make the initial selection
-        if (binding == 'switch-group') {
+        if (binding == 'internal-keybinding-switch-group') {
             if (backward) {
                 this._select(0, this._appIcons[0].cachedWindows.length - 1);
             } else {
@@ -208,9 +208,9 @@ const AltTabPopup = new Lang.Class({
                 else
                     this._select(0, 0);
             }
-        } else if (binding == 'switch-group-backward') {
+        } else if (binding == 'internal-keybinding-switch-group-backward') {
             this._select(0, this._appIcons[0].cachedWindows.length - 1);
-        } else if (binding == 'switch-windows-backward') {
+        } else if (binding == 'internal-keybinding-switch-windows-backward') {
             this._select(this._appIcons.length - 1);
         } else if (this._appIcons.length == 1) {
             this._select(0);
diff --git a/js/ui/main.js b/js/ui/main.js
index 0a8b63f..c551369 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -69,7 +69,7 @@ let _overridesSettings = null;
 let background = null;
 
 function _sessionUpdated() {
-    Meta.keybindings_set_custom_handler('panel-run-dialog', sessionMode.hasRunDialog ? Util.wrapKeybinding(openRunDialog, true) : null);
+    Meta.keybindings_set_custom_handler('internal-keybinding-panel-run-dialog', sessionMode.hasRunDialog ? Util.wrapKeybinding(openRunDialog, true) : null);
     if (sessionMode.isGreeter)
         screenShield.showDialog();
 }
@@ -155,7 +155,7 @@ function start() {
 
     global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
                                             false, -1, 1);
-    Meta.keybindings_set_custom_handler('panel-main-menu', Util.wrapKeybinding(Lang.bind(overview, function() {
+    Meta.keybindings_set_custom_handler('internal-keybinding-panel-main-menu', Util.wrapKeybinding(Lang.bind(overview, function() {
         this.toggle();
         return true;
     }), true));
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index bc15e85..5be4cc4 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -102,31 +102,31 @@ const WindowManager = new Lang.Class({
         this._shellwm.connect('destroy', Lang.bind(this, this._destroyWindow));
 
         this._workspaceSwitcherPopup = null;
-        Meta.keybindings_set_custom_handler('switch-to-workspace-left',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-to-workspace-left',
                                             Util.wrapKeybinding(Lang.bind(this, this._showWorkspaceSwitcher), true));
-        Meta.keybindings_set_custom_handler('switch-to-workspace-right',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-to-workspace-right',
                                             Util.wrapKeybinding(Lang.bind(this, this._showWorkspaceSwitcher), true));
-        Meta.keybindings_set_custom_handler('switch-to-workspace-up',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-to-workspace-up',
                                             Util.wrapKeybinding(Lang.bind(this, this._showWorkspaceSwitcher), true));
-        Meta.keybindings_set_custom_handler('switch-to-workspace-down',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-to-workspace-down',
                                             Util.wrapKeybinding(Lang.bind(this, this._showWorkspaceSwitcher), true));
-        Meta.keybindings_set_custom_handler('move-to-workspace-left',
+        Meta.keybindings_set_custom_handler('internal-keybinding-move-to-workspace-left',
                                             Lang.bind(this, this._showWorkspaceSwitcher));
-        Meta.keybindings_set_custom_handler('move-to-workspace-right',
+        Meta.keybindings_set_custom_handler('internal-keybinding-move-to-workspace-right',
                                             Lang.bind(this, this._showWorkspaceSwitcher));
-        Meta.keybindings_set_custom_handler('move-to-workspace-up',
+        Meta.keybindings_set_custom_handler('internal-keybinding-move-to-workspace-up',
                                             Lang.bind(this, this._showWorkspaceSwitcher));
-        Meta.keybindings_set_custom_handler('move-to-workspace-down',
+        Meta.keybindings_set_custom_handler('internal-keybinding-move-to-workspace-down',
                                             Lang.bind(this, this._showWorkspaceSwitcher));
-        Meta.keybindings_set_custom_handler('switch-windows',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-windows',
                                             Lang.bind(this, this._startAppSwitcher));
-        Meta.keybindings_set_custom_handler('switch-group',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-group',
                                             Lang.bind(this, this._startAppSwitcher));
-        Meta.keybindings_set_custom_handler('switch-windows-backward',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-windows-backward',
                                             Lang.bind(this, this._startAppSwitcher));
-        Meta.keybindings_set_custom_handler('switch-group-backward',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-group-backward',
                                             Lang.bind(this, this._startAppSwitcher));
-        Meta.keybindings_set_custom_handler('switch-panels',
+        Meta.keybindings_set_custom_handler('internal-keybinding-switch-panels',
                                             Util.wrapKeybinding(Lang.bind(this, this._startA11ySwitcher), true));
         global.display.add_keybinding('open-application-menu',
                                       new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
@@ -572,7 +572,7 @@ const WindowManager = new Lang.Class({
         if (screen.n_workspaces == 1)
             return false;
 
-        let [action,,,direction] = binding.get_name().split('-');
+        let [,,action,,,direction] = binding.get_name().split('-');
         let direction = Meta.MotionDirection[direction.toUpperCase()];
         let newWs;
 



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