changed plugin APIs for entryAcitonPlugins and customAttributePlugins.

Internal housekeeping on MPPluginHost to allow for better access to certain plugins
Still pending: menu action to plugin delegation
This commit is contained in:
Michael Starke
2017-12-06 20:02:22 +01:00
parent 4fa52e23ef
commit 91508f0dde
3 changed files with 38 additions and 5 deletions

View File

@@ -65,13 +65,13 @@ NS_ASSUME_NONNULL_BEGIN
MacPass will call you back via -[MPPlugin performActionFroMenuItem:withEntries:]
*/
@protocol MPEntryActionPlugin <NSObject>
@optional
- (NSMenuItem * _Nullable)menuItemForEntry;
@required
- (NSArray<NSMenuItem *> *)menuItemsForEntries:(NSArray< KPKEntry *>*)entries;
- (void)performActionForMenuItem:(NSMenuItem *)item withEntries:(NSArray <KPKEntry *>*)entries;
@end
@protocol MPCustomAttributePlugin <NSObject>
@optional
@required
/* Supply a list of attribute keys that will get suggested for autocompletion as well as added to the extend add for custom fields */
@property (nonatomic,copy) NSArray<NSString *>* attributeKeys;
/*