mirror of
https://github.com/transmission/transmission
synced 2025-02-04 13:32:19 +00:00
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
This commit is contained in:
parent
263bf6934d
commit
4bffa20e5c
1 changed files with 2 additions and 20 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue