1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

a little more streamlining

This commit is contained in:
Mitchell Livingston 2007-12-20 01:06:55 +00:00
parent 5f57d0cf11
commit e7756980ab

View file

@ -1821,18 +1821,22 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
int downloading = 0, seeding = 0, paused = 0;
NSString * filterType = [fDefaults stringForKey: @"Filter"];
BOOL filterDownload = [filterType isEqualToString: FILTER_DOWNLOAD],
filterSeed = [filterType isEqualToString: FILTER_SEED],
filterPause = [filterType isEqualToString: FILTER_PAUSE];
BOOL filterDownload = NO, filterSeed = NO, filterPause = NO, filterStatus = YES;
if ([filterType isEqualToString: FILTER_DOWNLOAD])
filterDownload = YES;
else if ([filterType isEqualToString: FILTER_SEED])
filterSeed = YES;
else if ([filterType isEqualToString: FILTER_PAUSE])
filterPause = YES;
else
filterStatus = NO;
int groupFilterValue = [fDefaults integerForKey: @"FilterGroup"];
BOOL filterGroup = groupFilterValue != GROUP_FILTER_ALL_TAG;
int groupFilter = [fDefaults integerForKey: @"FilterGroup"];
NSString * searchString = [fSearchFilterField stringValue];
BOOL filterStatus = filterDownload || filterSeed || filterPause,
filterGroup = groupFilter != GROUP_FILTER_ALL_TAG,
filterText = [searchString length] > 0;
BOOL filterTracker = filterText && [[fDefaults stringForKey: @"FilterSearchType"] isEqualToString: FILTER_TYPE_TRACKER];
BOOL filterText = [searchString length] > 0,
filterTracker = filterText && [[fDefaults stringForKey: @"FilterSearchType"] isEqualToString: FILTER_TYPE_TRACKER];
NSMutableIndexSet * indexes = [NSMutableIndexSet indexSet];
@ -1869,7 +1873,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
//checkGroup
if (filterGroup)
if ([torrent groupValue] != groupFilter)
if ([torrent groupValue] != groupFilterValue)
continue;
//check text field