diff --git a/macosx/CTGradient/CTGradientAdditions.h b/macosx/CTGradient/CTGradientAdditions.h index 722b836fd..0e79816a4 100644 --- a/macosx/CTGradient/CTGradientAdditions.h +++ b/macosx/CTGradient/CTGradientAdditions.h @@ -36,6 +36,7 @@ + (CTGradient *)progressBlueGradient; + (CTGradient *)progressGreenGradient; + (CTGradient *)progressLightGreenGradient; ++ (CTGradient *)progressYellowGradient; + (CTGradient *)progressTransparentGradient; @end diff --git a/macosx/CTGradient/CTGradientAdditions.m b/macosx/CTGradient/CTGradientAdditions.m index 5edd3d668..54043ff41 100644 --- a/macosx/CTGradient/CTGradientAdditions.m +++ b/macosx/CTGradient/CTGradientAdditions.m @@ -310,6 +310,12 @@ return [newInstance autorelease]; } ++ (CTGradient *)progressYellowGradient +{ + #warning someone make a real one! + return [CTGradient gradientWithBeginningColor: [NSColor orangeColor] endingColor: [NSColor yellowColor]]; +} + + (CTGradient *)progressTransparentGradient { CTGradient *newInstance = [[[self class] alloc] init]; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 5d7b42411..fe288628e 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -524,6 +524,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [NSNumber numberWithFloat: [self progress]], @"Progress", [NSNumber numberWithFloat: (float)fStat->left/[self size]], @"Left", [NSNumber numberWithBool: [self isActive]], @"Active", + [NSNumber numberWithBool: [self isChecking]], @"Checking", [NSNumber numberWithBool: [self isError]], @"Error", nil]; if ([self isSeeding]) @@ -1658,7 +1659,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 { NSEnumerator * enumerator = [siblings objectEnumerator]; while ((dict = [enumerator nextObject])) - if ([[dict objectForKey: @"Name"] isEqualToString: name] && [[dict objectForKey: @"IsFolder"] boolValue]) + if ([[dict objectForKey: @"IsFolder"] boolValue] && [[dict objectForKey: @"Name"] isEqualToString: name]) break; } diff --git a/macosx/TorrentCell.h b/macosx/TorrentCell.h index ccd874b9e..20edf3752 100644 --- a/macosx/TorrentCell.h +++ b/macosx/TorrentCell.h @@ -32,7 +32,7 @@ { NSImage * fErrorImage; CTGradient * fWhiteGradient, * fGrayGradient, * fLightGrayGradient, * fLightGreenGradient, - * fGreenGradient, * fBlueGradient, * fTransparentGradient; + * fGreenGradient, * fYellowGradient, * fBlueGradient, * fTransparentGradient; NSUserDefaults * fDefaults; } diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 192cb5582..7a8044c5e 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -52,6 +52,7 @@ fBlueGradient = [[CTGradient progressBlueGradient] retain]; fGreenGradient = [[CTGradient progressGreenGradient] retain]; fLightGreenGradient = [[CTGradient progressLightGreenGradient] retain]; + fYellowGradient = [[CTGradient progressYellowGradient] retain]; fTransparentGradient = [[CTGradient progressTransparentGradient] retain]; fErrorImage = [[NSImage imageNamed: @"Error"] copy]; @@ -100,7 +101,9 @@ } } - if ([[info objectForKey: @"Seeding"] boolValue]) + if ([[info objectForKey: @"Checking"] boolValue]) + [fYellowGradient fillRect: completeBounds angle: -90]; + else if ([[info objectForKey: @"Seeding"] boolValue]) { NSRect ratioBounds = completeBounds; ratioBounds.size.width *= [[info objectForKey: @"ProgressStopRatio"] floatValue]; @@ -109,13 +112,10 @@ [fLightGreenGradient fillRect: completeBounds angle: -90]; [fGreenGradient fillRect: ratioBounds angle: -90]; } + else if ([[info objectForKey: @"Active"] boolValue]) + [fBlueGradient fillRect: completeBounds angle: -90]; else - { - if ([[info objectForKey: @"Active"] boolValue]) - [fBlueGradient fillRect: completeBounds angle: -90]; - else - [fGrayGradient fillRect: completeBounds angle: -90]; - } + [fGrayGradient fillRect: completeBounds angle: -90]; [[NSColor colorWithDeviceWhite: 0.0 alpha: 0.2] set]; [NSBezierPath strokeRect: NSInsetRect(barBounds, 0.5, 0.5)];