diff --git a/ChangeLog b/ChangeLog index 9a406e711..53c1b48cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-27 Richard Frith-Macdonald + + * Source/GSServicesManager.m: Tidy last patch to match use of + whitespace etc in GNUstep code. + 2003-10-26 15:18 Alexander Malmberg Matt Rice @@ -33,7 +38,7 @@ 2003-10-24 Richard Frith-Macdonald - * Source/NSWorkspace.m: Change a few uses of '/' in stgrings to + * Source/NSWorkspace.m: Change a few uses of '/' in strings to use stringByAppendingPatchComponent: * Tools/gopen.m: Fix to pass the full path of the file to the app being used to open it, so relative paths in the arguments diff --git a/Source/GSServicesManager.m b/Source/GSServicesManager.m index 24eed6f23..1d360eb69 100644 --- a/Source/GSServicesManager.m +++ b/Source/GSServicesManager.m @@ -1379,31 +1379,40 @@ GSContactApplication(NSString *appName, NSString *port, NSDate *expire) NSDictionary * _serviceFromAnyLocalizedTitle(NSString *title) { - NSDictionary *allServices; - NSEnumerator *e1; - NSDictionary *service; + NSDictionary *allServices; + NSEnumerator *e1; + NSDictionary *service; allServices = [manager menuServices]; - if(allServices == nil) - return nil; - - if([allServices objectForKey: title] != nil) - return [allServices objectForKey: title]; - - e1 = [allServices objectEnumerator]; - while((service = [e1 nextObject])) + if (allServices == nil) { - NSDictionary *menuItems; - NSString *itemName; - NSEnumerator *e2; + return nil; + } + + if ([allServices objectForKey: title] != nil) + { + return [allServices objectForKey: title]; + } + e1 = [allServices objectEnumerator]; + while ((service = [e1 nextObject]) != nil) + { + NSDictionary *menuItems; + NSString *itemName; + NSEnumerator *e2; menuItems = [service objectForKey: @"NSMenuItem"]; - if(menuItems == nil) - continue; + if (menuItems == nil) + { + continue; + } e2 = [menuItems objectEnumerator]; - while((itemName = [e2 nextObject])) - if([itemName isEqualToString: title]) - return service; + while ((itemName = [e2 nextObject]) != nil) + { + if ([itemName isEqualToString: title] == YES) + { + return service; + } + } } return nil;