From d836254dc7afeb85686c5d8a5c8711b6e38b37fc Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 15 Aug 2007 03:43:54 +0000 Subject: [PATCH] get file tab working again --- macosx/FileNameCell.m | 2 +- macosx/FilePriorityCell.m | 4 ++-- macosx/InfoWindowController.m | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/macosx/FileNameCell.m b/macosx/FileNameCell.m index 2ca87b705..d3b5ea29c 100644 --- a/macosx/FileNameCell.m +++ b/macosx/FileNameCell.m @@ -99,7 +99,7 @@ [titleString drawInRect: titleRect]; //status - if ([[[self objectValue] objectForKey: @"IsFolder"] boolValue]) + if (![[[self objectValue] objectForKey: @"IsFolder"] boolValue]) { NSAttributedString * statusString = [self attributedStatusWithColor: highlighted ? [NSColor whiteColor] : [NSColor darkGrayColor]]; diff --git a/macosx/FilePriorityCell.m b/macosx/FilePriorityCell.m index bb823e878..1c15b0bec 100644 --- a/macosx/FilePriorityCell.m +++ b/macosx/FilePriorityCell.m @@ -37,14 +37,14 @@ else priority = TR_PRI_NORMAL; - [torrent setFilePriority: priority forIndexes: [[self objectValue] objectForKey: @"Indexes"]]; + [torrent setFilePriority: priority forIndexes: [[self representedObject] objectForKey: @"Indexes"]]; [(FileOutlineView *)[self controlView] reloadData]; } - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView { Torrent * torrent = [(InfoWindowController *)[[[self controlView] window] windowController] selectedTorrent]; - NSDictionary * dict = [self objectValue]; + NSDictionary * dict = [self representedObject]; NSSet * priorities = [torrent filePrioritiesForIndexes: [dict objectForKey: @"Indexes"]]; int count = [priorities count]; diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index bfc7d905d..0c86ef591 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -879,6 +879,9 @@ NSString * identifier = [tableColumn identifier]; if ([identifier isEqualToString: @"Check"]) [cell setEnabled: [[fTorrents objectAtIndex: 0] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]]]; + else if ([identifier isEqualToString: @"Priority"]) + [cell setRepresentedObject: item]; + else; } - (void) outlineView: (NSOutlineView *) outlineView setObjectValue: (id) object