simplify how the torrent table gets the type ahead name for group rows

This commit is contained in:
Mitchell Livingston 2012-11-02 21:46:18 +00:00
parent 79c7bab472
commit b242dcaf14
1 changed files with 4 additions and 2 deletions

View File

@ -201,8 +201,10 @@
- (NSString *) outlineView: (NSOutlineView *) outlineView typeSelectStringForTableColumn: (NSTableColumn *) tableColumn item: (id) item
{
return [item isKindOfClass: [Torrent class]] ? [(Torrent *)item name]
: [[self preparedCellAtColumn: [self columnWithIdentifier: @"Group"] row: [self rowForItem: item]] stringValue];
if ([item isKindOfClass: [Torrent class]])
return [(Torrent *)item name];
else
return [[self dataSource] outlineView:outlineView objectValueForTableColumn:[self tableColumnWithIdentifier:@"Group"] byItem:item];
}
- (NSString *) outlineView: (NSOutlineView *) outlineView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect tableColumn: (NSTableColumn *) column item: (id) item mouseLocation: (NSPoint) mouseLocation