Skip to content

Commit 7c384e1

Browse files
committed
Override the 10.8+ open method
1 parent 7ce7955 commit 7c384e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Classes/Controllers/PBRepositoryDocumentController.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
@implementation PBRepositoryDocumentController
1818
// This method is overridden to configure the open panel to only allow
1919
// selection of directories
20-
- (NSInteger)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)extensions
21-
{
20+
- (void)beginOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray<NSString *> *)inTypes completionHandler:(void (^)(NSInteger))completionHandler {
2221
[openPanel setCanChooseFiles:YES];
2322
[openPanel setCanChooseDirectories:YES];
2423
[openPanel setAllowedFileTypes:[NSArray arrayWithObject:@"git"]];
25-
return [openPanel runModal];
24+
25+
NSModalResponse response = [openPanel runModal];
26+
27+
completionHandler(response);
2628
}
2729

2830
- (id)makeUntitledDocumentOfType:(NSString *)typeName error:(NSError *__autoreleasing *)outError {

0 commit comments

Comments
 (0)