Changeset 835
- Timestamp:
- Aug 29, 2006, 12:09:49 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Transmission.xcodeproj/project.pbxproj
r828 r835 117 117 A25FCDEF0A3769A6002BCBBE /* PauseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = A25FCDDD0A37695F002BCBBE /* PauseSelected.png */; }; 118 118 A25FCDF00A3769AC002BCBBE /* ResumeSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = A25FCDDE0A37695F002BCBBE /* ResumeSelected.png */; }; 119 A260C9AC0AA3B8D700FDC1B7 /* Error.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A260C9AB0AA3B8D700FDC1B7 /* Error.tiff */; }; 119 120 A261F1DC0A69A1610002815A /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; }; 120 121 A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; }; … … 322 323 A25FCDDD0A37695F002BCBBE /* PauseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseSelected.png; path = macosx/Images/PauseSelected.png; sourceTree = "<group>"; }; 323 324 A25FCDDE0A37695F002BCBBE /* ResumeSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeSelected.png; path = macosx/Images/ResumeSelected.png; sourceTree = "<group>"; }; 325 A260C9AB0AA3B8D700FDC1B7 /* Error.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Error.tiff; path = macosx/Images/Error.tiff; sourceTree = "<group>"; }; 324 326 A261F1DB0A69A1610002815A /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = macosx/Growl.framework; sourceTree = "<group>"; }; 325 327 A2710E740A86796000CE4F7D /* PrefsWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PrefsWindow.h; path = macosx/PrefsWindow.h; sourceTree = "<group>"; }; … … 454 456 A2305A7E0A3DC9E400AB2D77 /* ProgressBarGray.png */, 455 457 A2305A7F0A3DC9E400AB2D77 /* ProgressBarGreen.png */, 458 A260C9AB0AA3B8D700FDC1B7 /* Error.tiff */, 456 459 A2D4F0840A915F7200890C32 /* GreenDot.tiff */, 457 460 A2D4F0820A915F6600890C32 /* RedDot.tiff */, … … 778 781 A2D4F0850A915F7200890C32 /* GreenDot.tiff in Resources */, 779 782 A21567ED0A9A5034004DECD6 /* MessageWindow.nib in Resources */, 783 A260C9AC0AA3B8D700FDC1B7 /* Error.tiff in Resources */, 780 784 ); 781 785 runOnlyForDeploymentPostprocessing = 0; -
trunk/macosx/Torrent.h
r789 r835 113 113 - (BOOL) isSeeding; 114 114 - (BOOL) isPaused; 115 - (BOOL) isError; 115 116 - (BOOL) justFinished; 116 117 -
trunk/macosx/Torrent.m
r805 r835 510 510 } 511 511 512 - (BOOL) isError 513 { 514 return fStat->error & TR_ETRACKER; 515 } 516 512 517 - (BOOL) justFinished 513 518 { -
trunk/macosx/TorrentCell.h
r695 r835 33 33 Torrent * fTorrent; 34 34 BOOL fStatusRegular; 35 36 NSImage * fProgressWhite, * fProgressBlue, * fProgressGray, * fProgressGreen, 37 * fProgressAdvanced, * fProgressEndWhite, * fProgressEndBlue, 38 * fProgressEndGray, * fProgressEndGreen, * fProgressEndAdvanced, 39 * fErrorImage; 35 40 36 41 NSUserDefaults * fDefaults; -
trunk/macosx/TorrentCell.m
r729 r835 39 39 @implementation TorrentCell 40 40 41 static NSImage * fProgressWhite, * fProgressBlue, * fProgressGray, * fProgressGreen,42 * fProgressAdvanced, * fProgressEndWhite, * fProgressEndBlue,43 * fProgressEndGray, * fProgressEndGreen, * fProgressEndAdvanced;44 45 41 // Used to optimize drawing. They contain packed RGBA pixels for every color needed. 46 42 #define BE OSSwapBigToHostConstInt32 … … 69 65 70 66 NSSize startSize = NSMakeSize(100.0, BAR_HEIGHT); 71 if (!fProgressWhite) 72 { 73 fProgressWhite = [NSImage imageNamed: @"ProgressBarWhite.png"]; 74 [fProgressWhite setScalesWhenResized: YES]; 75 } 76 if (!fProgressBlue) 77 { 78 fProgressBlue = [NSImage imageNamed: @"ProgressBarBlue.png"]; 79 [fProgressBlue setScalesWhenResized: YES]; 80 [fProgressBlue setSize: startSize]; 81 } 82 if (!fProgressGray) 83 { 84 fProgressGray = [NSImage imageNamed: @"ProgressBarGray.png"]; 85 [fProgressGray setScalesWhenResized: YES]; 86 [fProgressGray setSize: startSize]; 87 } 88 if (!fProgressGreen) 89 { 90 fProgressGreen = [NSImage imageNamed: @"ProgressBarGreen.png"]; 91 [fProgressGreen setScalesWhenResized: YES]; 92 } 93 if (!fProgressAdvanced) 94 { 95 fProgressAdvanced = [NSImage imageNamed: @"ProgressBarAdvanced.png"]; 96 [fProgressAdvanced setScalesWhenResized: YES]; 97 } 98 99 if (!fProgressEndWhite) 100 fProgressEndWhite = [NSImage imageNamed: @"ProgressBarEndWhite.png"]; 101 if (!fProgressEndBlue) 102 fProgressEndBlue = [NSImage imageNamed: @"ProgressBarEndBlue.png"]; 103 if (!fProgressEndGray) 104 fProgressEndGray = [NSImage imageNamed: @"ProgressBarEndGray.png"]; 105 if (!fProgressEndGreen) 106 fProgressEndGreen = [NSImage imageNamed: @"ProgressBarEndGreen.png"]; 107 if (!fProgressEndAdvanced) 108 fProgressEndAdvanced = [NSImage imageNamed: @"ProgressBarEndAdvanced.png"]; 67 68 fProgressWhite = [NSImage imageNamed: @"ProgressBarWhite.png"]; 69 [fProgressWhite setScalesWhenResized: YES]; 70 71 72 fProgressBlue = [NSImage imageNamed: @"ProgressBarBlue.png"]; 73 [fProgressBlue setScalesWhenResized: YES]; 74 [fProgressBlue setSize: startSize]; 75 76 fProgressGray = [NSImage imageNamed: @"ProgressBarGray.png"]; 77 [fProgressGray setScalesWhenResized: YES]; 78 [fProgressGray setSize: startSize]; 79 80 fProgressGreen = [NSImage imageNamed: @"ProgressBarGreen.png"]; 81 [fProgressGreen setScalesWhenResized: YES]; 82 83 fProgressAdvanced = [NSImage imageNamed: @"ProgressBarAdvanced.png"]; 84 [fProgressAdvanced setScalesWhenResized: YES]; 85 86 87 fProgressEndWhite = [NSImage imageNamed: @"ProgressBarEndWhite.png"]; 88 fProgressEndBlue = [NSImage imageNamed: @"ProgressBarEndBlue.png"]; 89 fProgressEndGray = [NSImage imageNamed: @"ProgressBarEndGray.png"]; 90 fProgressEndGreen = [NSImage imageNamed: @"ProgressBarEndGreen.png"]; 91 fProgressEndAdvanced = [NSImage imageNamed: @"ProgressBarEndAdvanced.png"]; 92 93 fErrorImage = [NSImage imageNamed: @"Error.tiff"]; 94 [fErrorImage setFlipped: YES]; 95 [fErrorImage setScalesWhenResized: YES]; 96 [fErrorImage setSize: NSMakeSize(16.0, 16.0)]; 109 97 } 110 98 return self; … … 314 302 [icon drawAtPoint: pen fromRect: NSMakeRect(0, 0, iconSize.width, iconSize.height) 315 303 operation: NSCompositeSourceOver fraction: 1.0]; 304 305 //error badge 306 if ([fTorrent isError]) 307 { 308 NSSize errorIconSize = [fErrorImage size]; 309 [fErrorImage drawAtPoint: NSMakePoint(pen.x + iconSize.width - errorIconSize.width, 310 pen.y + iconSize.height - errorIconSize.height) 311 fromRect: NSMakeRect(0, 0, errorIconSize.width, errorIconSize.height) 312 operation: NSCompositeSourceOver fraction: 1.0]; 313 } 316 314 317 315 float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT; … … 352 350 { 353 351 //icon 354 NSImage * icon = [fTorrent iconSmall];352 NSImage * icon = ![fTorrent isError] ? [fTorrent iconSmall] : fErrorImage; 355 353 NSSize iconSize = [icon size]; 356 354
Note: See TracChangeset
for help on using the changeset viewer.