From 218ddd0cb9f318fabfd90b520a4d3de9b7ef42c5 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 12 Jun 2006 04:56:07 +0000 Subject: [PATCH] Make private methods actually private. --- macosx/TorrentTableView.m | 68 +++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 81de47650..021cb189e 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -54,38 +54,6 @@ fTorrents = torrents; } -- (NSRect) pauseRectForRow: (int) row -{ - NSRect cellRect = [self frameOfCellAtColumn: - [self columnWithIdentifier: @"Torrent"] row: row]; - - return NSMakeRect(cellRect.origin.x + cellRect.size.width - - AREA_CENTER - DISTANCE_FROM_CENTER - BUTTON_WIDTH, - cellRect.origin.y + BUTTON_TO_TOP, BUTTON_WIDTH, BUTTON_WIDTH); -} - -- (NSRect) revealRectForRow: (int) row -{ - NSRect cellRect = [self frameOfCellAtColumn: - [self columnWithIdentifier: @"Torrent"] row: row]; - - return NSMakeRect(cellRect.origin.x + cellRect.size.width - - AREA_CENTER + DISTANCE_FROM_CENTER, - cellRect.origin.y + BUTTON_TO_TOP, BUTTON_WIDTH, BUTTON_WIDTH); -} - -- (BOOL) pointInPauseRect: (NSPoint) point -{ - return NSPointInRect( point, [self pauseRectForRow: - [self rowAtPoint: point]] ); -} - -- (BOOL) pointInRevealRect: (NSPoint) point -{ - return NSPointInRect( point, [self revealRectForRow: - [self rowAtPoint: point]] ); -} - - (void) mouseDown: (NSEvent *) e { fClickPoint = [self convertPoint: [e locationInWindow] fromView: nil]; @@ -214,3 +182,39 @@ } @end + +@implementation TorrentTableView (Private) + +- (NSRect) pauseRectForRow: (int) row +{ + NSRect cellRect = [self frameOfCellAtColumn: + [self columnWithIdentifier: @"Torrent"] row: row]; + + return NSMakeRect(cellRect.origin.x + cellRect.size.width + - AREA_CENTER - DISTANCE_FROM_CENTER - BUTTON_WIDTH, + cellRect.origin.y + BUTTON_TO_TOP, BUTTON_WIDTH, BUTTON_WIDTH); +} + +- (NSRect) revealRectForRow: (int) row +{ + NSRect cellRect = [self frameOfCellAtColumn: + [self columnWithIdentifier: @"Torrent"] row: row]; + + return NSMakeRect(cellRect.origin.x + cellRect.size.width + - AREA_CENTER + DISTANCE_FROM_CENTER, + cellRect.origin.y + BUTTON_TO_TOP, BUTTON_WIDTH, BUTTON_WIDTH); +} + +- (BOOL) pointInPauseRect: (NSPoint) point +{ + return NSPointInRect( point, [self pauseRectForRow: + [self rowAtPoint: point]] ); +} + +- (BOOL) pointInRevealRect: (NSPoint) point +{ + return NSPointInRect( point, [self revealRectForRow: + [self rowAtPoint: point]] ); +} + +@end