mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:20:48 +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
03fce98126
commit
cd4624b22d
1 changed files with 14 additions and 5 deletions
|
@ -220,13 +220,22 @@ static NSInputManager *currentInputManager = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selector = NSSelectorFromString (action);
|
/* "" as action means disable the keybinding. It can be used to override
|
||||||
if (selector == NULL)
|
a previous keybinding. */
|
||||||
|
if ([action isEqualToString: @""])
|
||||||
{
|
{
|
||||||
NSLog (@"NSInputManager: unknown selector '%@' ignored", action);
|
selector = NULL;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
selector = NSSelectorFromString (action);
|
||||||
|
if (selector == NULL)
|
||||||
|
{
|
||||||
|
NSLog (@"NSInputManager: unknown selector '%@' ignored", action);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if there are already some bindings for this character. */
|
/* Check if there are already some bindings for this character. */
|
||||||
for (i = 0; i < _bindingsCount; i++)
|
for (i = 0; i < _bindingsCount; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue