in file selection, if you option click a file checkbox, it will select/deselect all

This commit is contained in:
Mitchell Livingston 2007-07-04 18:32:48 +00:00
parent ab20e6d645
commit 8959463882
1 changed files with 7 additions and 2 deletions

View File

@ -916,8 +916,13 @@
if ([identifier isEqualToString: @"Check"])
{
Torrent * torrent = [fTorrents objectAtIndex: 0];
[torrent setFileCheckState: [object intValue] != NSOffState ? NSOnState : NSOffState
forIndexes: [item objectForKey: @"Indexes"]];
NSIndexSet * indexSet;
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
indexSet = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [torrent fileCount])];
else
indexSet = [item objectForKey: @"Indexes"];
[torrent setFileCheckState: [object intValue] != NSOffState ? NSOnState : NSOffState forIndexes: indexSet];
[fFileOutline reloadData];
}
else;