mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
improve priority context menu
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>29 56 356 240 0 0 1024 746 </string>
|
||||
<string>35 67 356 240 0 0 1152 842 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>549</key>
|
||||
|
||||
Binary file not shown.
@@ -672,16 +672,20 @@
|
||||
else
|
||||
priority = PRIORITY_NORMAL;
|
||||
|
||||
NSIndexSet * fileIndexSet;
|
||||
for (i = [indexSet firstIndex]; i != NSNotFound && (!current || !other); i = [indexSet indexGreaterThanIndex: i])
|
||||
{
|
||||
if ([torrent hasFilePriority: priority forIndexes: [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"]])
|
||||
fileIndexSet = [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"];
|
||||
if (![torrent canChangeDownloadCheckForFiles: fileIndexSet])
|
||||
continue;
|
||||
else if ([torrent hasFilePriority: priority forIndexes: fileIndexSet])
|
||||
current = YES;
|
||||
else
|
||||
other = YES;
|
||||
}
|
||||
|
||||
[menuItem setState: current ? (other ? NSMixedState : NSOnState) : NSOffState];
|
||||
return YES;
|
||||
[menuItem setState: current ? NSOnState : NSOffState];
|
||||
return current || other;
|
||||
}
|
||||
|
||||
return YES;
|
||||
|
||||
Reference in New Issue
Block a user