mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
(-updateServicesMenu): Always enable an item with a submenu.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17999 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
27c626ce07
commit
6aef871f82
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-10-29 02:22 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSServicesManager.m (-updateServicesMenu): Always enable
|
||||
an item with a submenu.
|
||||
|
||||
2003-10-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSSavePanel.m: Change to have entire window accept DnD.
|
||||
|
|
|
@ -1252,13 +1252,20 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
/*
|
||||
* If there is no title mapping, this item must be a
|
||||
* submenu - so we check the submenu items.
|
||||
*
|
||||
* We always enable the submenu item itself. We do this
|
||||
* to prevent confusion (if the user is trying to use
|
||||
* a disabled item, it's clearer to show that item disabled
|
||||
* than to hide it in a disabled submenu), and to encourage
|
||||
* the user to explore the interface (it makes it possible
|
||||
* to browse the service list at any time).
|
||||
*/
|
||||
if (title == nil && [[item submenu] isKindOfClass: [NSMenu class]])
|
||||
{
|
||||
NSArray *sub = [[item submenu] itemArray];
|
||||
unsigned j;
|
||||
|
||||
shouldBeEnabled = NO;
|
||||
shouldBeEnabled = YES;
|
||||
for (j = 0; j < [sub count]; j++)
|
||||
{
|
||||
NSMenuItem *subitem = [sub objectAtIndex: j];
|
||||
|
@ -1267,7 +1274,6 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
|
||||
if ([self validateMenuItem: subitem] == YES)
|
||||
{
|
||||
shouldBeEnabled = YES; /* Enabled menu */
|
||||
subShouldBeEnabled = YES;
|
||||
}
|
||||
if (subWasEnabled != subShouldBeEnabled)
|
||||
|
|
Loading…
Reference in a new issue