mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 15:30:18 +00:00
b85a205698
Multiple repositories can now be opened by using the File → Open… menu option. Each document is a PBGitRepository with a PBDetailController controlling the window. PBRepositoryDocumentController is the document controller. When launched, the application will attempt to open a repository with the current directory as its path. If this fails it will display an open panel to allow the user to select one.
22 lines
589 B
Objective-C
22 lines
589 B
Objective-C
//
|
|
// PBRepositoryDocumentController.mm
|
|
// GitX
|
|
//
|
|
// Created by Ciarán Walsh on 15/08/2008.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import "PBRepositoryDocumentController.h"
|
|
|
|
|
|
@implementation PBRepositoryDocumentController
|
|
// This method is overridden to configure the open panel to only allow
|
|
// selection of directories
|
|
- (NSInteger)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)extensions
|
|
{
|
|
[openPanel setCanChooseFiles:NO];
|
|
[openPanel setCanChooseDirectories:YES];
|
|
return [openPanel runModalForDirectory:nil file:nil types:nil];
|
|
}
|
|
@end
|