mirror of
https://github.com/transmission/transmission
synced 2025-02-23 22:50:41 +00:00
add a warning and improve some commented out code....nothing to see here
This commit is contained in:
parent
d96ed80aa2
commit
78d95148dc
2 changed files with 11 additions and 11 deletions
|
@ -493,7 +493,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||||
if ([torrent isActive])
|
if ([torrent isActive])
|
||||||
{
|
{
|
||||||
active++;
|
active++;
|
||||||
if (![torrent isSeeding])
|
if (![torrent allDownloaded])
|
||||||
downloading++;
|
downloading++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,30 +268,30 @@
|
||||||
|
|
||||||
if (rightWidth > 0)
|
if (rightWidth > 0)
|
||||||
{
|
{
|
||||||
|
int availableWidth = 0;
|
||||||
/*if (![fDefaults boolForKey: @"DisplayProgressBarAvailable"])
|
/*if (![fDefaults boolForKey: @"DisplayProgressBarAvailable"])
|
||||||
{
|
{
|
||||||
int notAvailableWidth = barRect.size.width * [torrent notAvailableDesired];
|
|
||||||
//NSLog(@"notAvailableWidth %d rightWidth %d", notAvailableWidth, rightWidth);
|
//NSLog(@"notAvailableWidth %d rightWidth %d", notAvailableWidth, rightWidth);
|
||||||
notAvailableWidth = MIN(notAvailableWidth, rightWidth);
|
availableWidth = MAX(0, (float)rightWidth - barRect.size.width * [torrent notAvailableDesired]);
|
||||||
|
|
||||||
if (notAvailableWidth > 0)
|
if (availableWidth > 0)
|
||||||
{
|
{
|
||||||
rightWidth -= notAvailableWidth;
|
rightWidth -= availableWidth;
|
||||||
|
|
||||||
NSRect notAvailableRect = barRect;
|
NSRect availableRect = barRect;
|
||||||
notAvailableRect.origin.x += leftWidth + rightWidth;
|
availableRect.origin.x += leftWidth;
|
||||||
notAvailableRect.size.width = notAvailableWidth;
|
availableRect.size.width = availableWidth;
|
||||||
|
|
||||||
if (!fYellowGradient)
|
if (!fYellowGradient)
|
||||||
fYellowGradient = [[CTGradient progressYellowGradient] retain];
|
fYellowGradient = [[CTGradient progressYellowGradient] retain];
|
||||||
[fYellowGradient fillRect: notAvailableRect angle: -90];
|
[fYellowGradient fillRect: availableRect angle: -90];
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (rightWidth > 0)
|
if (rightWidth > 0)
|
||||||
{
|
{
|
||||||
NSRect includeRect = barRect;
|
NSRect includeRect = barRect;
|
||||||
includeRect.origin.x += leftWidth;
|
includeRect.origin.x += leftWidth + availableWidth;
|
||||||
includeRect.size.width = rightWidth;
|
includeRect.size.width = rightWidth;
|
||||||
|
|
||||||
if (!fWhiteGradient)
|
if (!fWhiteGradient)
|
||||||
|
|
Loading…
Reference in a new issue