Merge branch 'fix_interspacing'
[GitX.git] / PBRepositoryDocumentController.m
blobc29f37d42ede5221955b020ad9b1d7f24b911ced
1 //
2 //  PBRepositoryDocumentController.mm
3 //  GitX
4 //
5 //  Created by CiarĂ¡n Walsh on 15/08/2008.
6 //  Copyright 2008 __MyCompanyName__. All rights reserved.
7 //
9 #import "PBRepositoryDocumentController.h"
10 #import "PBGitRepository.h"
12 @implementation PBRepositoryDocumentController
13 // This method is overridden to configure the open panel to only allow
14 // selection of directories
15 - (NSInteger)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)extensions
17         [openPanel setCanChooseFiles:NO];
18         [openPanel setCanChooseDirectories:YES];
19         return [openPanel runModalForDirectory:nil file:nil types:nil];
22 // Convert paths to the .git dir before searching for an already open document
23 - (id)documentForURL:(NSURL *)URL
25         return [super documentForURL:[PBGitRepository gitDirForURL:URL]];
28 - (void)noteNewRecentDocumentURL:(NSURL*)url
30         [super noteNewRecentDocumentURL:[PBGitRepository baseDirForURL:url]];
32 @end