mirror of
https://github.com/transmission/transmission
synced 2025-02-04 21:43:03 +00:00
only show "selected" in the progress bar (and allow toggling) for multifile torrents
This commit is contained in:
parent
641a8ca618
commit
2d3ec18f08
3 changed files with 7 additions and 5 deletions
|
@ -970,7 +970,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
|
||||
if (![self allDownloaded])
|
||||
{
|
||||
if ([fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
if ([self folder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
{
|
||||
string = [NSString localizedStringWithFormat: NSLocalizedString(@"%@ of %@ selected (%.2f%%)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self haveTotal]],
|
||||
|
@ -983,7 +983,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
}
|
||||
else if (![self isComplete])
|
||||
{
|
||||
if ([fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
if ([self folder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"%@ selected, uploaded %@ (Ratio: %@)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self haveTotal]],
|
||||
[NSString stringForFileSize: [self uploadedTotal]], [NSString stringForRatio: [self ratio]]];
|
||||
|
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
if (NSMouseInRect(point, [self controlButtonRectForBounds: cellFrame], [controlView isFlipped])
|
||||
|| NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped])
|
||||
|| NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped])
|
||||
|| (NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped]) && [[self representedObject] folder])
|
||||
|| NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped]))
|
||||
return NSCellHitContentArea | NSCellHitTrackableArea;
|
||||
|
||||
|
@ -284,7 +284,7 @@
|
|||
BOOL checkReveal = NSMouseInRect(point, revealRect, [controlView isFlipped]);
|
||||
|
||||
NSRect progressRect = [self progressRectForBounds: cellFrame];
|
||||
BOOL checkProgress = NSMouseInRect(point, progressRect, [controlView isFlipped]);
|
||||
BOOL checkProgress = NSMouseInRect(point, progressRect, [controlView isFlipped]) && [[self representedObject] folder];
|
||||
|
||||
NSRect minimalStatusRect = [self minimalStatusRectForBounds: cellFrame];
|
||||
BOOL checkMinStatus = NSMouseInRect(point, minimalStatusRect, [controlView isFlipped]);
|
||||
|
|
|
@ -780,10 +780,12 @@
|
|||
return NSPointInRect(point, [fTorrentCell iconRectForBounds: [self rectOfRow: row]]);
|
||||
}
|
||||
|
||||
#warning finish folder check
|
||||
- (BOOL) pointInProgressRect: (NSPoint) point
|
||||
{
|
||||
int row = [self rowAtPoint: point];
|
||||
if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]] || [fDefaults boolForKey: @"SmallView"])
|
||||
if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]] || [fDefaults boolForKey: @"SmallView"]
|
||||
|| ![[self itemAtRow: row] folder])
|
||||
return NO;
|
||||
|
||||
TorrentCell * cell;
|
||||
|
|
Loading…
Reference in a new issue