* Source/NSMenu.m: Correction to previous change. Update when

setAutoenableItems: value is changed.  Altered update to 
	enable menu items when autoenable is not being performed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27569 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-01-10 04:03:12 +00:00
parent 864092095d
commit 3bab225349
2 changed files with 22 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2009-01-09 23:09-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSMenu.m: Correction to previous change. Update when
setAutoenableItems: value is changed. Altered update to
enable menu items when autoenable is not being performed.
2009-01-09 22:53-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSMenuItemCell.m: encode menu item in encodeWithCoder:

View file

@ -933,6 +933,7 @@ static BOOL menuBarVisible = YES;
- (void) setAutoenablesItems: (BOOL)flag
{
_menu.autoenable = flag;
[self update];
}
- (BOOL) autoenablesItems
@ -1056,6 +1057,20 @@ static BOOL menuBarVisible = YES;
// Reenable displaying of menus
[self setMenuChangedMessagesEnabled: YES];
}
else
{
id<NSMenuItem> item = nil;
NSEnumerator *en = [_items objectEnumerator];
//
// If the menu items are not autoenabled, they should be enabled by default
// sincer we're not checking them.
//
while((item = [en nextObject]) != nil)
{
[item setEnabled: YES];
}
}
if (_menu.needsSizing && ([_aWindow isVisible] || [_bWindow isVisible]))
{
@ -1420,7 +1435,7 @@ static BOOL menuBarVisible = YES;
}
else
{
dAuto = NO;
dAuto = YES; // if the no-autoenable flag isn't present, then autoenable.
}
dTitle = [aDecoder decodeObjectForKey: @"NSTitle"];
dItems = [aDecoder decodeObjectForKey: @"NSMenuItems"];