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
|
- (BOOL) isError
|
||||||
{return YES;
|
{
|
||||||
return fStat->error != 0;
|
return fStat->error != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#import "CTGradient.h"
|
@class CTGradient;
|
||||||
|
|
||||||
@interface TorrentCell : NSCell
|
@interface TorrentCell : NSCell
|
||||||
{
|
{
|
||||||
|
|
|
@ -507,18 +507,10 @@
|
||||||
int row = [self rowAtPoint: point];
|
int row = [self rowAtPoint: point];
|
||||||
if (row < 0 || ![fDefaults boolForKey: @"SmallView"])
|
if (row < 0 || ![fDefaults boolForKey: @"SmallView"])
|
||||||
return NO;
|
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;
|
TorrentCell * cell = [[self tableColumnWithIdentifier: @"Torrent"] dataCell];
|
||||||
|
[cell setRepresentedObject: [fTorrents objectAtIndex: row]];
|
||||||
NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
|
return NSPointInRect(point, [cell minimalStatusRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||||
NSRect statusRect = NSMakeRect(NSMaxX(cellRect) - statusWidth, cellRect.origin.y,
|
|
||||||
statusWidth, cellRect.size.height - BUTTON_WIDTH);
|
|
||||||
|
|
||||||
return NSPointInRect(point, statusRect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) pointInPauseRect: (NSPoint) point
|
- (BOOL) pointInPauseRect: (NSPoint) point
|
||||||
|
|
Loading…
Reference in New Issue