mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
small cleanup
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user