mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:21:56 +00:00
* 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:
parent
94d202c31a
commit
4e9cc540e9
2 changed files with 22 additions and 1 deletions
|
@ -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>
|
2009-01-09 22:53-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSMenuItemCell.m: encode menu item in encodeWithCoder:
|
* Source/NSMenuItemCell.m: encode menu item in encodeWithCoder:
|
||||||
|
|
|
@ -933,6 +933,7 @@ static BOOL menuBarVisible = YES;
|
||||||
- (void) setAutoenablesItems: (BOOL)flag
|
- (void) setAutoenablesItems: (BOOL)flag
|
||||||
{
|
{
|
||||||
_menu.autoenable = flag;
|
_menu.autoenable = flag;
|
||||||
|
[self update];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) autoenablesItems
|
- (BOOL) autoenablesItems
|
||||||
|
@ -1056,6 +1057,20 @@ static BOOL menuBarVisible = YES;
|
||||||
// Reenable displaying of menus
|
// Reenable displaying of menus
|
||||||
[self setMenuChangedMessagesEnabled: YES];
|
[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]))
|
if (_menu.needsSizing && ([_aWindow isVisible] || [_bWindow isVisible]))
|
||||||
{
|
{
|
||||||
|
@ -1420,7 +1435,7 @@ static BOOL menuBarVisible = YES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dAuto = NO;
|
dAuto = YES; // if the no-autoenable flag isn't present, then autoenable.
|
||||||
}
|
}
|
||||||
dTitle = [aDecoder decodeObjectForKey: @"NSTitle"];
|
dTitle = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||||
dItems = [aDecoder decodeObjectForKey: @"NSMenuItems"];
|
dItems = [aDecoder decodeObjectForKey: @"NSMenuItems"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue