mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 02:51:14 +00:00
Improve menu item validation by falling back to -validateUserInterfaceItem:
if the validator doesn't respond to -validateMenuItem:. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27625 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f61fe0106
commit
d40bb8140a
2 changed files with 10 additions and 1 deletions
|
@ -1042,6 +1042,11 @@ static BOOL menuBarVisible = YES;
|
|||
{
|
||||
shouldBeEnabled = [validator validateMenuItem: item];
|
||||
}
|
||||
else if ([validator
|
||||
respondsToSelector: @selector(validateUserInterfaceItem:)])
|
||||
{
|
||||
shouldBeEnabled = [validator validateUserInterfaceItem: item];
|
||||
}
|
||||
else
|
||||
{
|
||||
shouldBeEnabled = YES;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue