Changeset 12473
- Timestamp:
- May 30, 2011, 12:09:22 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEWS
r12461 r12473 1 1 === Transmission 2.32 (2011/xx/yy) === 2 2 [http://trac.transmissionbt.com/query?milestone=2.32&group=component&order=severity All tickets closed by this release] 3 ==== Mac ==== 4 * Lion stability fixes 3 5 ==== GTK+ ==== 4 6 * Remove GNOME desktop proxy support -
trunk/Transmission.xcodeproj/project.pbxproj
r12457 r12473 105 105 A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */; }; 106 106 A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F820C4D8A610034AB1D /* PriorityHigh.png */; }; 107 A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */; };108 107 A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FA40C4D97840034AB1D /* PriorityNone.png */; }; 109 108 A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */; }; … … 569 568 A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityLow.png; path = macosx/Images/PriorityLow.png; sourceTree = "<group>"; }; 570 569 A20B6F820C4D8A610034AB1D /* PriorityHigh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityHigh.png; path = macosx/Images/PriorityHigh.png; sourceTree = "<group>"; }; 571 A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityMixed.png; path = macosx/Images/PriorityMixed.png; sourceTree = "<group>"; };572 570 A20B6FA40C4D97840034AB1D /* PriorityNone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNone.png; path = macosx/Images/PriorityNone.png; sourceTree = "<group>"; }; 573 571 A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNormal.png; path = macosx/Images/PriorityNormal.png; sourceTree = "<group>"; }; … … 1221 1219 A209EC11114301C6002B02D1 /* InfoOptionsView.xib */, 1222 1220 A20B6FA40C4D97840034AB1D /* PriorityNone.png */, 1223 A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */,1224 1221 A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */, 1225 1222 A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */, … … 2046 2043 A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */, 2047 2044 A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */, 2048 A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */,2049 2045 A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */, 2050 2046 A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */, -
trunk/macosx/FilePriorityCell.m
r12445 r12473 28 28 #import "NSApplicationAdditions.h" 29 29 #import "Torrent.h" 30 31 #define IMAGE_OVERLAP 3.0 30 32 31 33 @implementation FilePriorityCell … … 124 126 else 125 127 { 126 NSImage * image; 128 NSMutableArray * images = [NSMutableArray arrayWithCapacity: MAX(count, 1)]; 129 CGFloat totalWidth; 130 127 131 if (count == 0) 128 image = [NSImage imageNamed: @"PriorityNone.png"]; 129 else if (count > 1) 130 image = [NSImage imageNamed: @"PriorityMixed.png"]; 132 { 133 NSImage * image = [NSImage imageNamed: @"PriorityNone.png"]; 134 [images addObject: image]; 135 totalWidth = [image size].width; 136 } 131 137 else 132 138 { 133 switch ([[priorities anyObject] integerValue]) 139 totalWidth = 0.0; 140 if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_LOW]]) 134 141 { 135 case TR_PRI_NORMAL: 136 image = [NSImage imageNamed: @"PriorityNormal.png"]; 137 break; 138 case TR_PRI_LOW: 139 image = [NSImage imageNamed: @"PriorityLow.png"]; 140 break; 141 case TR_PRI_HIGH: 142 image = [NSImage imageNamed: @"PriorityHigh.png"]; 143 break; 142 NSImage * image = [NSImage imageNamed: @"PriorityLow.png"]; 143 [images addObject: image]; 144 totalWidth += [image size].width; 145 } 146 if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_NORMAL]]) 147 { 148 NSImage * image = [NSImage imageNamed: @"PriorityNormal.png"]; 149 [images addObject: image]; 150 totalWidth += [image size].width; 151 } 152 if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_HIGH]]) 153 { 154 NSImage * image = [NSImage imageNamed: @"PriorityHigh.png"]; 155 [images addObject: image]; 156 totalWidth += [image size].width; 144 157 } 145 158 } 146 159 147 NSSize imageSize = [image size]; 148 NSRect imageRect = NSMakeRect(NSMidX(cellFrame) - imageSize.width * 0.5, NSMidY(cellFrame) - imageSize.height * 0.5, 149 imageSize.width, imageSize.height); 160 if (count > 1) 161 totalWidth -= IMAGE_OVERLAP * (count-1); 150 162 151 if ([NSApp isOnSnowLeopardOrBetter]) 152 [image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 153 respectFlipped: YES hints: nil]; 154 else 163 CGFloat currentWidth = floor(NSMidX(cellFrame) - totalWidth * 0.5); 164 165 for (NSImage * image in images) 155 166 { 156 image = [image copy]; 157 [image setFlipped: YES]; 158 [image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; 159 [image release]; 167 const NSSize imageSize = [image size]; 168 NSRect imageRect = NSMakeRect(currentWidth, floor(NSMidY(cellFrame) - imageSize.height * 0.5), imageSize.width, imageSize.height); 169 170 if ([NSApp isOnSnowLeopardOrBetter]) 171 [image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil]; 172 else 173 { 174 image = [image copy]; 175 [image setFlipped: YES]; 176 [image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; 177 [image release]; 178 } 179 180 currentWidth += imageSize.width - IMAGE_OVERLAP; 160 181 } 161 182 }
Note: See TracChangeset
for help on using the changeset viewer.