Changeset 3730
- Timestamp:
- Nov 6, 2007, 4:53:06 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/appcast.xml
r3726 r3730 7 7 <language>en</language> 8 8 <pubDate>Tue, 23 Oct 2007 23:20:00 -0400</pubDate> 9 <lastBuildDate>Mon, 0 7Nov 2007 16:45:00 -0400</lastBuildDate>9 <lastBuildDate>Mon, 05 Nov 2007 16:45:00 -0400</lastBuildDate> 10 10 11 11 <item> … … 25 25 <li>Leopard: Fix bug with toggling Minimal View</li> 26 26 </ul>]]></description> 27 <pubDate>Mon, 0 7Nov 2007 16:45:00 -0400</pubDate>28 <enclosure sparkle:version="3711" sparkle:shortVersionString="0.92" url="http://mirrors.m0k.org/transmission/files/Transmission-0.92.dmg" length="214 3155" type="application/octet-stream"/>27 <pubDate>Mon, 05 Nov 2007 16:45:00 -0400</pubDate> 28 <enclosure sparkle:version="3711" sparkle:shortVersionString="0.92" url="http://mirrors.m0k.org/transmission/files/Transmission-0.92.dmg" length="2145246" type="application/octet-stream"/> 29 29 </item> 30 30 -
trunk/macosx/Controller.m
r3714 r3730 296 296 297 297 //set sort 298 #warning clean up 298 299 NSString * sortType = [fDefaults stringForKey: @"Sort"]; 299 300 … … 336 337 337 338 //set filter 339 #warning clean up 338 340 NSString * filterType = [fDefaults stringForKey: @"Filter"]; 339 341 -
trunk/macosx/TorrentCell.h
r3698 r3730 36 36 * fGreenGradient, * fLightGreenGradient, * fDarkGreenGradient, * fYellowGradient, * fTransparentGradient; 37 37 38 NSColor * fGrayColor, * fBlueColor, * fBlue1Color, * fBlue2Color, * fBlue3Color, * fBlue4Color; 39 38 40 NSBitmapImageRep * fBitmap; 39 41 int8_t * fPieces; -
trunk/macosx/TorrentCell.m
r3719 r3730 54 54 @interface TorrentCell (Private) 55 55 56 // Used to optimize drawing. They contain packed RGBA pixels for every color needed.57 static uint32_t kBlue = OSSwapBigToHostConstInt32(0x50A0FFFF), //80, 160, 25558 kBlue1 = OSSwapBigToHostConstInt32(0x84FFFFFF), //204, 255, 25559 kBlue2 = OSSwapBigToHostConstInt32(0x6BFFFFFF), //153, 255, 25560 kBlue3 = OSSwapBigToHostConstInt32(0x6B84FFFF), //153, 204, 25561 kBlue4 = OSSwapBigToHostConstInt32(0x426BFFFF), //102, 153, 25562 kGray = OSSwapBigToHostConstInt32(0xE9E9E9FF); //100, 100, 10063 64 56 - (void) drawBar: (NSRect) barRect; 65 57 - (void) drawRegularBar: (NSRect) barRect; … … 96 88 paragraphStyle, NSParagraphStyleAttributeName, nil]; 97 89 [paragraphStyle release]; 90 91 //store box colors 92 fGrayColor = [[NSColor colorWithCalibratedRed: 0.9 green: 0.9 blue: 0.9 alpha: 1.0] retain]; 93 fBlue1Color = [[NSColor colorWithCalibratedRed: 0.8 green: 1.0 blue: 1.0 alpha: 1.0] retain]; 94 fBlue2Color = [[NSColor colorWithCalibratedRed: 0.6 green: 1.0 blue: 1.0 alpha: 1.0] retain]; 95 fBlue3Color = [[NSColor colorWithCalibratedRed: 0.6 green: 0.8 blue: 1.0 alpha: 1.0] retain]; 96 fBlue4Color = [[NSColor colorWithCalibratedRed: 0.4 green: 0.6 blue: 1.0 alpha: 1.0] retain]; 97 fBlueColor = [[NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0] retain]; 98 98 99 99 fBarOverlayColor = [[NSColor colorWithDeviceWhite: 0.0 alpha: 0.2] retain]; … … 446 446 isPlanar: NO colorSpaceName: NSCalibratedRGBColorSpace bytesPerRow: 0 bitsPerPixel: 0]; 447 447 448 uint32_t * p;449 uint8_t * bitmapData = [fBitmap bitmapData];450 int bytesPerRow = [fBitmap bytesPerRow];451 452 448 if (!fPieces) 453 449 { … … 469 465 int i, h, index; 470 466 float increment = (float)pieceCount / MAX_PIECES; 471 uint32_t color;467 NSColor * pieceColor; 472 468 BOOL change; 473 469 for (i = 0; i < MAX_PIECES; i++) 474 470 { 475 471 index = i * increment; 476 change = NO;472 pieceColor = nil; 477 473 478 474 if (piecePercent[index] >= 1.0) … … 480 476 if (fPieces[i] != -1) 481 477 { 482 color = kBlue;478 pieceColor = fBlueColor; 483 479 fPieces[i] = -1; 484 change = YES;485 480 } 486 481 } … … 489 484 if (fPieces[i] != 0) 490 485 { 491 color = kGray;486 pieceColor = fGrayColor; 492 487 fPieces[i] = 0; 493 change = YES;494 488 } 495 489 } … … 498 492 if (fPieces[i] != 1) 499 493 { 500 color = kBlue1;494 pieceColor = fBlue1Color; 501 495 fPieces[i] = 1; 502 change = YES;503 496 } 504 497 } … … 507 500 if (fPieces[i] != 2) 508 501 { 509 color = kBlue2;502 pieceColor = fBlue2Color; 510 503 fPieces[i] = 2; 511 change = YES;512 504 } 513 505 } … … 516 508 if (fPieces[i] != 3) 517 509 { 518 color = kBlue3;510 pieceColor = fBlue3Color; 519 511 fPieces[i] = 3; 520 change = YES;521 512 } 522 513 } … … 525 516 if (fPieces[i] != 4) 526 517 { 527 color = kBlue4;518 pieceColor = fBlue4Color; 528 519 fPieces[i] = 4; 529 change = YES; 530 } 531 } 532 533 if (change) 534 { 535 //draw vertically 536 p = (uint32_t *)(bitmapData) + i; 520 } 521 } 522 523 if (pieceColor) 537 524 for (h = 0; h < barRect.size.height; h++) 538 { 539 p[0] = color; 540 p = (uint32_t *)((uint8_t *)p + bytesPerRow); 541 } 542 } 525 [fBitmap setColor: pieceColor atX: i y: h]; 543 526 } 544 527 … … 546 529 547 530 //actually draw image 548 NSImage * bar = [[NSImage alloc] initWithSize: [fBitmap size]]; 549 [bar setFlipped: YES]; 550 [bar addRepresentation: fBitmap]; 551 552 [bar drawInRect: barRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; 553 [bar release]; 531 [fBitmap drawInRect: barRect]; 554 532 555 533 if (!fTransparentGradient)
Note: See TracChangeset
for help on using the changeset viewer.