mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +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
|
@ -1,8 +1,12 @@
|
|||
2009-01-18 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSMenu.m (-upate, -setAutoenablesItems:, initWithCoder):
|
||||
* Source/NSMenu.m (-update, -setAutoenablesItems:, initWithCoder):
|
||||
Revert NSMenu changes from r27569.
|
||||
|
||||
* Source/NSMenu.m (-update): Improve menu item validation by
|
||||
falling back to -validateUserInterfaceItem: if the validator
|
||||
doesn't respond to -validateMenuItem:.
|
||||
|
||||
2009-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSDocument.m (-windowForSheet): Return nil if the
|
||||
|
|
|
@ -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…
Reference in a new issue