Fixed delta columns.

This commit is contained in:
Virgil Dupras 2011-11-27 12:54:58 -05:00
parent 7e95404903
commit 0571151c5f
7 changed files with 9 additions and 10 deletions

View File

@ -14,7 +14,7 @@ http://www.hardcoded.net/licenses/bsd_license
@interface ResultTable : HSTable <QLPreviewPanelDataSource, QLPreviewPanelDelegate>
{
NSIndexSet *_deltaColumns;
NSSet *_deltaColumns;
HSColumns *columns;
}
- (id)initWithPy:(id)aPy view:(NSTableView *)aTableView;
@ -24,7 +24,7 @@ http://www.hardcoded.net/licenses/bsd_license
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode;
- (BOOL)deltaValuesMode;
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode;
- (void)setDeltaColumns:(NSIndexSet *)aDeltaColumns;
- (void)setDeltaColumns:(NSSet *)aDeltaColumns;
- (NSInteger)selectedDupeCount;
- (void)removeSelected;
@end;

View File

@ -85,7 +85,7 @@ http://www.hardcoded.net/licenses/bsd_license
[[self py] setDeltaValuesMode:aDeltaValuesMode];
}
- (void)setDeltaColumns:(NSIndexSet *)aDeltaColumns
- (void)setDeltaColumns:(NSSet *)aDeltaColumns
{
[_deltaColumns release];
_deltaColumns = [aDeltaColumns retain];
@ -165,8 +165,7 @@ http://www.hardcoded.net/licenses/bsd_license
}
else if (isMarkable) {
if ([self deltaValuesMode]) {
NSInteger i = [[column identifier] integerValue];
if ([_deltaColumns containsIndex:i]) {
if ([_deltaColumns containsObject:[column identifier]]) {
color = [NSColor orangeColor];
}
}

View File

@ -31,7 +31,7 @@ http://www.hardcoded.net/licenses/bsd_license
[self fillColumnsMenu];
[matches setTarget:self];
[matches setDoubleAction:@selector(openClicked:)];
[table setDeltaColumns:[Utils array2IndexSet:[py deltaColumns]]];
[table setDeltaColumns:[NSSet setWithArray:[py deltaColumns]]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobCompleted:) name:JobCompletedNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobStarted:) name:JobStarted object:nil];

View File

@ -43,7 +43,7 @@ class DupeGuru(DupeGuruBase):
Column('size', 'Size (KB)'),
Column('extension', 'Kind'),
]
DELTA_COLUMNS = {2,}
DELTA_COLUMNS = {'size', }
METADATA_TO_READ = ['size']
def __init__(self):

View File

@ -16,7 +16,7 @@ from .result_table import ResultTable
class DupeGuru(DupeGuruBase):
NAME = __appname__
DELTA_COLUMNS = {2, 3, 4, 5, 7}
DELTA_COLUMNS = {'size', 'duration', 'bitrate', 'samplerate', 'mtime'}
METADATA_TO_READ = ['size', 'mtime', 'duration', 'bitrate', 'samplerate', 'title', 'artist',
'album', 'genre', 'year', 'track', 'comment']

View File

@ -24,7 +24,7 @@ def get_delta_dimensions(value, ref_value):
class DupeGuru(DupeGuruBase):
NAME = __appname__
DELTA_COLUMNS = {2, 4, 5}
DELTA_COLUMNS = {'size', 'dimensions', 'mtime'}
METADATA_TO_READ = ['size', 'mtime', 'dimensions']
def __init__(self, view, appdata):

View File

@ -15,7 +15,7 @@ from .result_table import ResultTable
class DupeGuru(DupeGuruBase):
NAME = __appname__
DELTA_COLUMNS = {2, 4}
DELTA_COLUMNS = {'size', 'mtime'}
METADATA_TO_READ = ['size', 'mtime']
def __init__(self, view, appdata):