mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
improve priority context menu
This commit is contained in:
parent
072a9c7916
commit
6bc49feffc
3 changed files with 8 additions and 4 deletions
2
macosx/English.lproj/InfoWindow.nib/info.nib
generated
2
macosx/English.lproj/InfoWindow.nib/info.nib
generated
|
@ -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>
|
||||
|
|
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
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;
|
||||
|
|
Loading…
Reference in a new issue