From 4bffa20e5ca35321f425917750dcc8a58580f318 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 18 Jan 2007 06:27:34 +0000 Subject: [PATCH] undo commit of being unable to unselect all files, since it was way too expensive on torrents with many files and might actually be desirable in some situations --- macosx/InfoWindowController.m | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index d820d598a..fbde719ac 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -55,7 +55,6 @@ - (void) setFileCheckState: (int) state forItem: (NSMutableDictionary *) item; - (NSMutableDictionary *) resetFileCheckStateForItemParent: (NSMutableDictionary *) originalChild; -- (BOOL) otherFilesWithCheckEnabled: (NSMutableDictionary *) item; @end @@ -694,7 +693,7 @@ [self setFileCheckState: state forItem: item]; NSMutableDictionary * topItem = [self resetFileCheckStateForItemParent: item]; - [fFileOutline reloadData]; + [fFileOutline reloadItem: topItem reloadChildren: YES]; } - (void) setFileCheckState: (int) state forItem: (NSMutableDictionary *) item @@ -760,28 +759,11 @@ else if ([[tableColumn identifier] isEqualToString: @"Check"]) { //always enable if mixed or off because clicking will turn on - [cell setEnabled: /*[cell intValue] != NSOnState || [self otherFilesWithCheckEnabled: item]*/ NO]; + [cell setEnabled: NO]; } else; } -- (BOOL) otherFilesWithCheckEnabled: (NSMutableDictionary *) item -{ - NSMutableDictionary * parent = [item objectForKey: @"Parent"], * sibling; - NSEnumerator * enumerator = [(parent ? [parent objectForKey: @"Children"] : fFiles) objectEnumerator]; - - while ((sibling = [enumerator nextObject])) - { - if (sibling == item) - continue; - else if ([[sibling objectForKey: @"Check"] intValue] != NSOffState) - return YES; - else; - } - - return parent ? [self otherFilesWithCheckEnabled: parent] : NO; -} - - (NSString *) outlineView: (NSOutlineView *) outlineView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation {