windowManager: Return the KeyBindingAction value from addKeybinding()

meta_display_add_keybinding() returns a keybinding action ID for
dynamically registered keybindings which can be used to match a
keycode/mask pair to the action it is bound to.

https://bugzilla.gnome.org/show_bug.cgi?id=682315
This commit is contained in:
Rui Matos 2012-12-12 09:40:49 +01:00
parent a9ec8a354a
commit b7678493f9

View File

@ -191,8 +191,10 @@ const WindowManager = new Lang.Class({
}, },
addKeybinding: function(name, settings, flags, modes, handler) { addKeybinding: function(name, settings, flags, modes, handler) {
if (global.display.add_keybinding(name, settings, flags, handler)) let action = global.display.add_keybinding(name, settings, flags, handler);
if (action != Meta.KeyBindingAction.NONE)
this.allowKeybinding(name, modes); this.allowKeybinding(name, modes);
return action;
}, },
removeKeybinding: function(name) { removeKeybinding: function(name) {