get the minimal status to toggle based on the new cell method, and fix silly test code that made the error icon always show
This commit is contained in:
parent
963c8ae76f
commit
87147ad2be
|
@ -1004,7 +1004,7 @@ static int static_lastid = 0;
|
|||
}
|
||||
|
||||
- (BOOL) isError
|
||||
{return YES;
|
||||
{
|
||||
return fStat->error != 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "CTGradient.h"
|
||||
@class CTGradient;
|
||||
|
||||
@interface TorrentCell : NSCell
|
||||
{
|
||||
|
|
|
@ -508,17 +508,9 @@
|
|||
if (row < 0 || ![fDefaults boolForKey: @"SmallView"])
|
||||
return NO;
|
||||
|
||||
Torrent * torrent = [fTorrents objectAtIndex: row];
|
||||
NSString * statusString = ![fDefaults boolForKey: @"SmallStatusRegular"] && [torrent isActive]
|
||||
? [torrent remainingTimeString] : [torrent shortStatusString];
|
||||
|
||||
float statusWidth = [statusString sizeWithAttributes: fSmallStatusAttributes].width + 3.0;
|
||||
|
||||
NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
|
||||
NSRect statusRect = NSMakeRect(NSMaxX(cellRect) - statusWidth, cellRect.origin.y,
|
||||
statusWidth, cellRect.size.height - BUTTON_WIDTH);
|
||||
|
||||
return NSPointInRect(point, statusRect);
|
||||
TorrentCell * cell = [[self tableColumnWithIdentifier: @"Torrent"] dataCell];
|
||||
[cell setRepresentedObject: [fTorrents objectAtIndex: row]];
|
||||
return NSPointInRect(point, [cell minimalStatusRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
}
|
||||
|
||||
- (BOOL) pointInPauseRect: (NSPoint) point
|
||||
|
|
Loading…
Reference in New Issue