mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 09:09:28 +00:00
More progress on import plugin support
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#import "MPValueTransformerHelper.h"
|
||||
#import "MPUserNotificationCenterDelegate.h"
|
||||
#import "MPWelcomeViewController.h"
|
||||
#import "MPPlugin.h"
|
||||
|
||||
#import "NSApplication+MPAdditions.h"
|
||||
|
||||
@@ -208,6 +209,17 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
[menu addItem:item];
|
||||
}
|
||||
}
|
||||
if(menu == self.importMenu) {
|
||||
NSMenuItem *exportXML = menu.itemArray.firstObject;
|
||||
[menu removeAllItems];
|
||||
for(MPPlugin<MPImportPlugin> * plugin in MPPluginHost.sharedHost.importPlugins) {
|
||||
NSMenuItem *importItem = [[NSMenuItem alloc] init];
|
||||
[plugin prepareImportMenuItem:importItem];
|
||||
importItem.target = nil;
|
||||
importItem.action = @selector(importFromPlugin:);
|
||||
}
|
||||
[menu insertItem:exportXML atIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user