More filter work

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17048 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-06-27 14:47:11 +00:00
parent f9f1b64f5d
commit d6b09a20ed
3 changed files with 150 additions and 12 deletions

View file

@ -1312,16 +1312,8 @@ GSContactApplication(NSString *appName, NSString *port, NSDate *expire)
return app;
}
/**
* <p>Given the name of a serviceItem, and some data in a pasteboard
* this function sends the data to the service provider (launching
* another application if necessary) and retrieves the result of
* the service in the pastebaord.
* </p>
* Returns YES on success, NO otherwise.
*/
BOOL
NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
GSPerformService(NSString *serviceItem, NSPasteboard *pboard, BOOL isFilter)
{
NSDictionary *service;
NSString *port;
@ -1335,7 +1327,14 @@ NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
NSString *userData;
NSString *error = nil;
service = [[manager menuServices] objectForKey: serviceItem];
if (isFilter == YES)
{
service = [[manager filters] objectForKey: serviceItem];
}
else
{
service = [[manager menuServices] objectForKey: serviceItem];
}
if (service == nil)
{
NSRunAlertPanel(nil,
@ -1417,6 +1416,20 @@ NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
return YES;
}
/**
* <p>Given the name of a serviceItem, and some data in a pasteboard
* this function sends the data to the service provider (launching
* another application if necessary) and retrieves the result of
* the service in the pastebaord.
* </p>
* Returns YES on success, NO otherwise.
*/
BOOL
NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
{
return GSPerformService(serviceItem, pboard, NO);
}
/**
* <p>Controls whether the item name should be included in the services menu.
* </p>