Files
gitx/PBRepositoryDocumentController.m
T
Ciarán Walsh b85a205698 Completing the document-based app setup.
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.
2008-08-18 08:58:39 +01:00

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