diff --git a/macosx/FileOutlineView.m b/macosx/FileOutlineView.m index 13db0801a..bbc58d87b 100644 --- a/macosx/FileOutlineView.m +++ b/macosx/FileOutlineView.m @@ -116,8 +116,12 @@ - (NSRect) iconRectForRow: (int) row { - FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell]; - return [cell imageRectForBounds: [self rectOfRow: row]]; + FileNameCell * cell = (FileNameCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Name"] row: row]; + NSRect iconRect = [cell imageRectForBounds: [self rectOfRow: row]]; + + iconRect.origin.x += [self frameOfOutlineCellAtRow: row].size.width; + iconRect.origin.x += [self indentationPerLevel] * (float)([self levelForRow: row] + ([[self itemAtRow: row] isFolder] ? 0 : 1)); + return iconRect; } - (void) updateTrackingAreas diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index 6f0c625a0..df22d3ecc 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -150,14 +150,12 @@ int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSCaseInsensitiveSearch | NSNumericSearch | NSWidthInsensitiveSearch | NSForcedOrderingSearch) : (NSCaseInsensitiveSearch | NSNumericSearch); - return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]]; } - (NSComparisonResult) compareNumeric: (NSString *) string { int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSNumericSearch | NSForcedOrderingSearch) : NSNumericSearch; - return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]]; }