mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 20:51:55 +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
ef794850a0
commit
966796d4e2
2 changed files with 10 additions and 1 deletions
|
@ -1,8 +1,12 @@
|
||||||
2009-01-18 Wolfgang Lux <wolfgang.lux@gmail.com>
|
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.
|
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>
|
2009-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSDocument.m (-windowForSheet): Return nil if the
|
* Source/NSDocument.m (-windowForSheet): Return nil if the
|
||||||
|
|
|
@ -1042,6 +1042,11 @@ static BOOL menuBarVisible = YES;
|
||||||
{
|
{
|
||||||
shouldBeEnabled = [validator validateMenuItem: item];
|
shouldBeEnabled = [validator validateMenuItem: item];
|
||||||
}
|
}
|
||||||
|
else if ([validator
|
||||||
|
respondsToSelector: @selector(validateUserInterfaceItem:)])
|
||||||
|
{
|
||||||
|
shouldBeEnabled = [validator validateUserInterfaceItem: item];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shouldBeEnabled = YES;
|
shouldBeEnabled = YES;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue