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
This commit is contained in:
Giovanni Campagna 2012-11-10 16:28:58 +01:00
parent 9dd2a467ba
commit d886dc17e1
3 changed files with 19 additions and 19 deletions

View File

@ -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);

View File

@ -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));

View File

@ -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;