mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-05 07:49:02 +00:00
e9a97afdf8
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%402
24 lines
827 B
Objective-C
24 lines
827 B
Objective-C
#import "DirectoryPanel.h"
|
|
|
|
@implementation DirectoryPanel
|
|
- (IBAction)addiTunes:(id)sender
|
|
{
|
|
[self addDirectory:[@"~/Music/iTunes/iTunes Music" stringByExpandingTildeInPath]];
|
|
}
|
|
|
|
- (IBAction)popupAddDirectoryMenu:(id)sender
|
|
{
|
|
NSMenu *m = [addButtonPopUp menu];
|
|
while ([m numberOfItems] > 0)
|
|
[m removeItemAtIndex:0];
|
|
NSMenuItem *mi = [m addItemWithTitle:@"Add New Directory..." action:@selector(askForDirectory:) keyEquivalent:@""];
|
|
[mi setTarget:self];
|
|
mi = [m addItemWithTitle:@"Add iTunes Directory" action:@selector(addiTunes:) keyEquivalent:@""];
|
|
[mi setTarget:self];
|
|
[m addItem:[NSMenuItem separatorItem]];
|
|
[_recentDirectories fillMenu:m];
|
|
[addButtonPopUp selectItem: nil];
|
|
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
|
}
|
|
@end
|