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

Removed logic duplication across toolkit code in "Add to Ignore List" action.

This commit is contained in:
Virgil Dupras
2010-02-06 12:12:20 +01:00
parent 64c67e19d2
commit 3c75d2f8b7
7 changed files with 38 additions and 35 deletions

View File

@@ -302,11 +302,10 @@ http://www.hardcoded.net/licenses/hs_license
NSArray *nodeList = [self getSelected:YES];
if (![nodeList count])
return;
if ([Dialogs askYesNo:[NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",[nodeList count]]] == NSAlertSecondButtonReturn) // NO
NSString *msg = [NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",[nodeList count]];
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
return;
[self performPySelection:[self getSelectedPaths:YES]];
[py addSelectedToIgnoreList];
[py removeSelected];
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
}