]> granicus.if.org Git - transmission/commitdiff
simplify how the torrent table gets the type ahead name for group rows
authorMitchell Livingston <livings124@transmissionbt.com>
Fri, 2 Nov 2012 21:46:18 +0000 (21:46 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Fri, 2 Nov 2012 21:46:18 +0000 (21:46 +0000)
macosx/TorrentTableView.m

index 474c25e110abcf85f426ffce7810921c4fdcd09b..7750b0ec4e5c77b4d7d4cb491ea9a506f5845d37 100644 (file)
 
 - (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