mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 11:40:37 +00:00
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:
parent
02e6c7f15c
commit
971194c387
3 changed files with 150 additions and 12 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue