mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Enable to disable a previous keybinding if a "" action is used
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12045 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4a9cde04cb
commit
81f0b95aaa
1 changed files with 14 additions and 5 deletions
|
@ -220,13 +220,22 @@ static NSInputManager *currentInputManager = nil;
|
|||
}
|
||||
}
|
||||
|
||||
selector = NSSelectorFromString (action);
|
||||
if (selector == NULL)
|
||||
/* "" as action means disable the keybinding. It can be used to override
|
||||
a previous keybinding. */
|
||||
if ([action isEqualToString: @""])
|
||||
{
|
||||
NSLog (@"NSInputManager: unknown selector '%@' ignored", action);
|
||||
return;
|
||||
selector = NULL;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
selector = NSSelectorFromString (action);
|
||||
if (selector == NULL)
|
||||
{
|
||||
NSLog (@"NSInputManager: unknown selector '%@' ignored", action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if there are already some bindings for this character. */
|
||||
for (i = 0; i < _bindingsCount; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue