2009-08-05 08:59:46 +00:00
|
|
|
/*
|
2012-03-15 18:28:40 +00:00
|
|
|
Copyright 2012 Hardcoded Software (http://www.hardcoded.net)
|
2009-08-05 08:59:46 +00:00
|
|
|
|
2010-09-30 10:17:41 +00:00
|
|
|
This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
2009-08-05 08:59:46 +00:00
|
|
|
which should be included with this package. The terms are also available at
|
2010-09-30 10:17:41 +00:00
|
|
|
http://www.hardcoded.net/licenses/bsd_license
|
2009-08-05 08:59:46 +00:00
|
|
|
*/
|
|
|
|
|
2009-06-01 09:55:11 +00:00
|
|
|
#import "DirectoryPanel.h"
|
|
|
|
|
2010-02-05 16:05:00 +00:00
|
|
|
@implementation DirectoryPanelPE
|
2009-06-01 09:55:11 +00:00
|
|
|
- (id)initWithParentApp:(id)aParentApp
|
|
|
|
{
|
|
|
|
self = [super initWithParentApp:aParentApp];
|
2011-01-14 14:07:11 +00:00
|
|
|
_alwaysShowPopUp = YES;
|
2009-06-01 09:55:11 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2011-01-14 14:07:11 +00:00
|
|
|
- (void)fillPopUpMenu
|
2009-06-01 09:55:11 +00:00
|
|
|
{
|
2011-01-14 14:07:11 +00:00
|
|
|
[super fillPopUpMenu];
|
2009-06-01 09:55:11 +00:00
|
|
|
NSMenu *m = [addButtonPopUp menu];
|
2012-08-01 20:34:12 +00:00
|
|
|
NSMenuItem *mi = [m insertItemWithTitle:NSLocalizedString(@"Add iPhoto Library", @"") action:@selector(addiPhoto:)
|
2011-01-14 14:07:11 +00:00
|
|
|
keyEquivalent:@"" atIndex:1];
|
2009-06-01 09:55:11 +00:00
|
|
|
[mi setTarget:self];
|
2012-08-01 20:34:12 +00:00
|
|
|
mi = [m insertItemWithTitle:NSLocalizedString(@"Add Aperture Library", @"") action:@selector(addAperture:)
|
2012-06-05 17:56:28 +00:00
|
|
|
keyEquivalent:@"" atIndex:2];
|
|
|
|
[mi setTarget:self];
|
2009-06-01 09:55:11 +00:00
|
|
|
}
|
|
|
|
|
2011-01-14 14:07:11 +00:00
|
|
|
- (IBAction)addiPhoto:(id)sender
|
2009-06-01 09:55:11 +00:00
|
|
|
{
|
2011-01-14 14:07:11 +00:00
|
|
|
[self addDirectory:@"iPhoto Library"];
|
2009-06-01 09:55:11 +00:00
|
|
|
}
|
2012-06-05 17:56:28 +00:00
|
|
|
|
|
|
|
- (IBAction)addAperture:(id)sender
|
|
|
|
{
|
|
|
|
[self addDirectory:@"Aperture Library"];
|
|
|
|
}
|
2009-06-01 09:55:11 +00:00
|
|
|
@end
|