1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#179] Pushed the delete-or-exclude folder down from GUI layers to the core.

This commit is contained in:
Virgil Dupras
2011-11-28 14:52:48 -05:00
parent 3342b32882
commit 756190cb8e
3 changed files with 12 additions and 22 deletions

View File

@@ -100,18 +100,8 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)removeSelectedDirectory:(id)sender
{
[[self window] makeKeyAndOrderFront:nil];
if ([outlineView selectedRow] < 0)
return;
NSIndexPath *path = [outline selectedIndexPath];
NSInteger state = [outline intProperty:@"state" valueAtPath:path];
if (([path length] == 1) && (state != 2)) {
[[outline py] removeSelectedDirectory];
}
else {
NSInteger newState = state == 2 ? 0 : 2; // If excluded, put it back
[outline setIntProperty:@"state" value:newState atPath:path];
[outlineView display];
}
[[outline py] removeSelectedDirectory];
[outlineView setNeedsDisplay:YES];
[self refreshRemoveButtonText];
}