mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Brought DirectoryPanel in ME and PE up to speed with latest developments and fixed ResultsWindow.awakeFromNib (in ME and PE also).
This commit is contained in:
@@ -7,45 +7,27 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
*/
|
||||
|
||||
#import "DirectoryPanel.h"
|
||||
#import "ProgressController.h"
|
||||
|
||||
static NSString* jobAddIPhoto = @"jobAddIPhoto";
|
||||
|
||||
@implementation DirectoryPanelPE
|
||||
- (id)initWithParentApp:(id)aParentApp
|
||||
{
|
||||
self = [super initWithParentApp:aParentApp];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobCompleted:) name:JobCompletedNotification object:nil];
|
||||
[[self window] setTitle:@"dupeGuru Picture Edition"];
|
||||
_alwaysShowPopUp = YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)fillPopUpMenu
|
||||
{
|
||||
[super fillPopUpMenu];
|
||||
NSMenu *m = [addButtonPopUp menu];
|
||||
NSMenuItem *mi = [m insertItemWithTitle:@"Add iPhoto Library" action:@selector(addiPhoto:)
|
||||
keyEquivalent:@"" atIndex:1];
|
||||
[mi setTarget:self];
|
||||
}
|
||||
|
||||
- (IBAction)addiPhoto:(id)sender
|
||||
{
|
||||
[[ProgressController mainProgressController] setJobDesc:@"Adding iPhoto Library..."];
|
||||
[[ProgressController mainProgressController] setJobId:jobAddIPhoto];
|
||||
[[ProgressController mainProgressController] showSheetForParent:[self window]];
|
||||
[self addDirectory:@"iPhoto Library"];
|
||||
}
|
||||
|
||||
- (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 iPhoto Directory" action:@selector(addiPhoto:) keyEquivalent:@""];
|
||||
[mi setTarget:self];
|
||||
[m addItem:[NSMenuItem separatorItem]];
|
||||
[_recentDirectories fillMenu:m];
|
||||
[addButtonPopUp selectItem:nil];
|
||||
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
||||
}
|
||||
|
||||
- (void)jobCompleted:(NSNotification *)aNotification
|
||||
{
|
||||
if ([[ProgressController mainProgressController] jobId] == jobAddIPhoto) {
|
||||
[outlineView reloadData];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -15,13 +15,13 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
@implementation ResultWindow
|
||||
/* Override */
|
||||
- (void)awakeFromNib
|
||||
- (id)initWithParentApp:(AppDelegateBase *)aApp;
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[[self window] setTitle:@"dupeGuru Picture Edition"];
|
||||
self = [super initWithParentApp:aApp];
|
||||
NSMutableIndexSet *deltaColumns = [NSMutableIndexSet indexSetWithIndex:2];
|
||||
[deltaColumns addIndex:5];
|
||||
[table setDeltaColumns:deltaColumns];
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
|
||||
Reference in New Issue
Block a user