mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Minor cleanup of update of services menu
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27914 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a2c687684d
commit
9d6e4d8b8b
2 changed files with 8 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-02-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSServicesManager.m: Clean up update of services menu,
|
||||
removing useless check and obsolete code.
|
||||
|
||||
2009-02-18 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSApplication.m (NSAppIconView-setImage:): Protect
|
||||
|
|
|
@ -1397,18 +1397,6 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
{
|
||||
NSArray *a;
|
||||
unsigned i;
|
||||
NSMenu *mainMenu = [_application mainMenu];
|
||||
BOOL found = NO;
|
||||
|
||||
a = [mainMenu itemArray];
|
||||
for (i = 0; i < [a count]; i++)
|
||||
if ([[a objectAtIndex: i] submenu] == _servicesMenu)
|
||||
found = YES;
|
||||
if (found == NO)
|
||||
{
|
||||
NSLog(@"Services menu not in main menu!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
a = [_servicesMenu itemArray];
|
||||
|
||||
|
@ -1449,18 +1437,17 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
if (subWasEnabled != subShouldBeEnabled)
|
||||
{
|
||||
[subitem setEnabled: subShouldBeEnabled];
|
||||
// [subMenuCells setNeedsDisplayInRect:
|
||||
// [subMenuCells cellFrameAtRow: j]];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
shouldBeEnabled = [self validateMenuItem: item];
|
||||
{
|
||||
shouldBeEnabled = [self validateMenuItem: item];
|
||||
}
|
||||
|
||||
if (wasEnabled != shouldBeEnabled)
|
||||
{
|
||||
[item setEnabled: shouldBeEnabled];
|
||||
// [menuCells setNeedsDisplayInRect: [menuCells cellFrameAtRow: i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue