mirror of
https://github.com/transmission/transmission
synced 2025-02-03 04:53:27 +00:00
small cleanup
This commit is contained in:
parent
28cd39da13
commit
ecc93b8032
2 changed files with 7 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue