Removed unneeded parameters in import API

This commit is contained in:
Michael Starke
2019-08-26 12:03:14 +02:00
parent bc47fb592c
commit 3b7bf0d77b
2 changed files with 5 additions and 4 deletions

View File

@@ -297,8 +297,10 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
NSOpenPanel *openPanel = NSOpenPanel.openPanel;
[importPlugin prepareOpenPanel:openPanel];
[openPanel beginSheetModalForWindow:sheetWindow completionHandler:^(NSModalResponse result) {
KPKTree *importedTree = [importPlugin treeForRunningOpenPanel:openPanel withResponse:result];
[self.document importTree:importedTree];
if(result == NSModalResponseOK) {
KPKTree *importedTree = [importPlugin treeForRunningOpenPanel:openPanel];
[self.document importTree:importedTree];
}
}];
}

View File

@@ -139,10 +139,9 @@ FOUNDATION_EXPORT NSString *const MPPluginDescriptionInfoDictionaryKey;
For example, if a CVS import might need user input on how to handle the parsed files this is the place to show it.
@param panel The open panel used for selecting what file(s) to import
@param response The response for of the user for running the panel
@return The KPKTree constructed from the selected input file(s)
*/
- (KPKTree *)treeForRunningOpenPanel:(NSOpenPanel *)panel withResponse:(NSModalResponse)response;
- (KPKTree *)treeForRunningOpenPanel:(NSOpenPanel *)panel;
@end
#pragma mark Deprecated