small cleanup

This commit is contained in:
Mitchell Livingston 2007-06-24 04:03:43 +00:00
parent 28cd39da13
commit ecc93b8032
2 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,8 @@
//only for when clicking manually
Torrent * torrent = [fItem objectForKey: @"Torrent"];
if (![torrent canChangeDownloadCheckForFiles: [fItem objectForKey: @"Indexes"]])
NSIndexSet * indexes = [fItem objectForKey: @"Indexes"];
if (![torrent canChangeDownloadCheckForFiles: indexes])
return;
int priority = segment, actualPriority;
@ -46,7 +47,7 @@
else
actualPriority = PRIORITY_NORMAL;
[torrent setFilePriority: actualPriority forIndexes: [fItem objectForKey: @"Indexes"]];
[torrent setFilePriority: actualPriority forIndexes: indexes];
[fParentView reloadData];
}

View File

@ -917,6 +917,10 @@
#warning consider hidden
Torrent * torrent = [fTorrents objectAtIndex: 0];
NSIndexSet * indexSet = [item objectForKey: @"Indexes"];
if (![torrent canChangeDownloadCheckForFiles: indexSet])
return NSLocalizedString(@"Priority Not Available", "Inspector -> files tab -> tooltip");
BOOL low = [torrent hasFilePriority: PRIORITY_LOW forIndexes: indexSet],
normal = [torrent hasFilePriority: PRIORITY_NORMAL forIndexes: indexSet],
high = [torrent hasFilePriority: PRIORITY_HIGH forIndexes: indexSet];