mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
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:
+1
-1
@@ -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
|
||||
{
|
||||
|
||||
@@ -507,18 +507,10 @@
|
||||
int row = [self rowAtPoint: point];
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user