* Source/NSMenu.m (-update): Added case to menu autoenabler to

disable supermenus that have empty submenus, when there is no
        validator.
        Patch by Paul Landers <paul.landers@testplant.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38289 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2015-01-11 21:56:27 +00:00
parent a8f35bbb94
commit e40611ea6c
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2015-01-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (-update): Added case to menu autoenabler to
disable supermenus that have empty submenus, when there is no
validator.
Patch by Paul Landers <paul.landers@testplant.com>.
2015-01-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m: Fix bizarre behavior with undo/redo

View file

@ -1192,7 +1192,11 @@ static BOOL menuBarVisible = YES;
{
shouldBeEnabled = [validator validateUserInterfaceItem: item];
}
else
else if ([item hasSubmenu] && [[item submenu] numberOfItems] == 0)
{
shouldBeEnabled = NO;
}
else
{
shouldBeEnabled = YES;
}