mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 13:44:37 +00:00
Removed getSelectedPaths() from ResultsWindow.
This commit is contained in:
parent
64c1087856
commit
310951bfa8
@ -21,6 +21,7 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
- (BOOL)deltaValuesMode;
|
||||
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode;
|
||||
- (void)setDeltaColumns:(NSIndexSet *)aDeltaColumns;
|
||||
- (NSInteger)selectedDupeCount;
|
||||
|
||||
- (IBAction)markSelected:(id)sender;
|
||||
@end;
|
@ -59,6 +59,23 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
_deltaColumns = [aDeltaColumns retain];
|
||||
}
|
||||
|
||||
- (NSInteger)selectedDupeCount
|
||||
{
|
||||
NSArray *selected = [self selectedIndexPaths];
|
||||
if ([self powerMarkerMode]) {
|
||||
return [selected count];
|
||||
}
|
||||
else {
|
||||
NSInteger r = 0;
|
||||
for (NSArray *path in selected) {
|
||||
if ([path count] == 1) {
|
||||
r++;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)markSelected:(id)sender
|
||||
{
|
||||
[[self py] markSelected];
|
||||
|
@ -38,7 +38,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
- (NSTableColumn *)getColumnForIdentifier:(NSInteger)aIdentifier title:(NSString *)aTitle width:(NSInteger)aWidth refCol:(NSTableColumn *)aColumn;
|
||||
- (NSArray *)getColumnsOrder;
|
||||
- (NSDictionary *)getColumnsWidth;
|
||||
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly;
|
||||
- (void)initResultColumns;
|
||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth;
|
||||
|
||||
|
@ -109,22 +109,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly
|
||||
{
|
||||
if ([outline powerMarkerMode])
|
||||
aDupesOnly = NO;
|
||||
NSIndexSet *indexes = [matches selectedRowIndexes];
|
||||
NSMutableArray *nodeList = [NSMutableArray array];
|
||||
NSInteger i = [indexes firstIndex];
|
||||
while (i != NSNotFound) {
|
||||
NSIndexPath *path = [matches itemAtRow:i];
|
||||
if (!aDupesOnly || ([path length] > 1))
|
||||
[nodeList addObject:p2a(path)];
|
||||
i = [indexes indexGreaterThanIndex:i];
|
||||
}
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
- (void)initResultColumns
|
||||
{
|
||||
// Virtual
|
||||
@ -220,10 +204,10 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (IBAction)ignoreSelected:(id)sender
|
||||
{
|
||||
NSArray *pathList = [self getSelectedPaths:YES];
|
||||
if (![pathList count])
|
||||
NSInteger selectedDupeCount = [outline selectedDupeCount];
|
||||
if (!selectedDupeCount)
|
||||
return;
|
||||
NSString *msg = [NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",[pathList count]];
|
||||
NSString *msg = [NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",selectedDupeCount];
|
||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[py addSelectedToIgnoreList];
|
||||
@ -295,10 +279,11 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (IBAction)removeSelected:(id)sender
|
||||
{
|
||||
NSArray *pathList = [self getSelectedPaths:YES];
|
||||
if (![pathList count])
|
||||
NSInteger selectedDupeCount = [outline selectedDupeCount];
|
||||
if (!selectedDupeCount)
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",[pathList count]]] == NSAlertSecondButtonReturn) // NO
|
||||
NSString *msg = [NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",selectedDupeCount];
|
||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[py removeSelected];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user