From 8959463882c63e97edc07e4c98eba66d0dc52c30 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 4 Jul 2007 18:32:48 +0000 Subject: [PATCH] in file selection, if you option click a file checkbox, it will select/deselect all --- macosx/InfoWindowController.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index a150535b6..f72ee98b6 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -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;