From 0588684061c6d677fe92c8a2d0b7c0bce128cd86 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 8 Aug 2007 02:44:32 +0000 Subject: [PATCH] get the torrent action button to appear pressed in --- macosx/Controller.m | 1 + macosx/TorrentTableView.m | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 631f2abc4..5f8447d2e 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2208,6 +2208,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy return YES; } +#warning get rid of delegate and make a notification - (void) tableViewSelectionDidChange: (NSNotification *) notification { [fInfoController updateInfoForTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]]; diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 2816b7d5a..92311a7b3 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -105,10 +105,9 @@ if ([self pointInActionRect: fClickPoint]) { - #warning use icon that doesn't change? [self display]; //ensure button is pushed down [self displayTorrentMenuForEvent: event]; - #warning get icon to change back + fClickPoint = NSZeroPoint; } else if (![self pointInPauseRect: fClickPoint] && ![self pointInRevealRect: fClickPoint]) { @@ -384,11 +383,12 @@ [image compositeToPoint: NSMakePoint(rect.origin.x, NSMaxY(rect)) operation: NSCompositeSourceOver]; //action icon - #warning make change if (![fDefaults boolForKey: @"SmallView"]) { + #warning make change rect = [self actionRectForRow: i]; - [fActionOffIcon compositeToPoint: NSMakePoint(rect.origin.x, NSMaxY(rect)) operation: NSCompositeSourceOver]; + image = NSPointInRect(fClickPoint, rect) ? fActionOnIcon : fActionOffIcon; + [image compositeToPoint: NSMakePoint(rect.origin.x, NSMaxY(rect)) operation: NSCompositeSourceOver]; } } }