Minor tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17987 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-10-28 10:19:51 +00:00
parent a019b68603
commit 5b5d4c307d
2 changed files with 34 additions and 20 deletions

View file

@ -1,3 +1,8 @@
2003-10-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSServicesManager.m: Tidy last patch to match use of
whitespace etc in GNUstep code.
2003-10-26 15:18 Alexander Malmberg <alexander@malmberg.org>
Matt Rice <ratmice@yahoo.com>
@ -33,7 +38,7 @@
2003-10-24 Richard Frith-Macdonald <rfm@gnu.org>
* 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

View file

@ -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;