Changeset 2171
- Timestamp:
- Jun 20, 2007, 10:53:46 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Transmission.xcodeproj/project.pbxproj
r2158 r2171 94 94 A28DBADC0A33C1D800F4B4A7 /* ActionButton.png in Resources */ = {isa = PBXBuildFile; fileRef = A28DBADB0A33C1D800F4B4A7 /* ActionButton.png */; }; 95 95 A2912C540A2956E80097A0CA /* PrefsWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = A2912C520A2956E80097A0CA /* PrefsWindow.nib */; }; 96 A291DAAF0AC8BEB6003385E9 /* PiecesView.m in Sources */ = {isa = PBXBuildFile; fileRef = A291DAAD0AC8BEB6003385E9 /* PiecesView.m */; };97 96 A29597350A72A9E10057248B /* StatusBarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = A29597340A72A9E10057248B /* StatusBarBackground.png */; }; 98 97 A29B0C270BD15FEF0006F230 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = A2F8951E0A2D4BA500ED2127 /* Credits.rtf */; }; … … 104 103 A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306580AAD24A80049E2AC /* UKKQueue.m */; }; 105 104 A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A3065A0AAD24A80049E2AC /* UKMainThreadProxy.m */; }; 106 A2AA579D0ADFCAB400CA59F6 /* Pieces ImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AA579B0ADFCAB400CA59F6 /* PiecesImageView.m */; };105 A2AA579D0ADFCAB400CA59F6 /* PiecesView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AA579B0ADFCAB400CA59F6 /* PiecesView.m */; }; 107 106 A2AF1C390A3D0F6200F1575D /* FileOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */; }; 108 107 A2BE9C520C1E4AF5002D16E6 /* makemeta.c in Sources */ = {isa = PBXBuildFile; fileRef = A2BE9C4E0C1E4ADA002D16E6 /* makemeta.c */; }; … … 390 389 A28DBADB0A33C1D800F4B4A7 /* ActionButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ActionButton.png; path = macosx/Images/ActionButton.png; sourceTree = "<group>"; }; 391 390 A2912C530A2956E80097A0CA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/PrefsWindow.nib; sourceTree = "<group>"; }; 392 A291DAAC0AC8BEB6003385E9 /* PiecesView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PiecesView.h; path = macosx/PiecesView.h; sourceTree = "<group>"; };393 A291DAAD0AC8BEB6003385E9 /* PiecesView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PiecesView.m; path = macosx/PiecesView.m; sourceTree = "<group>"; };394 391 A29597340A72A9E10057248B /* StatusBarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StatusBarBackground.png; path = macosx/Images/StatusBarBackground.png; sourceTree = "<group>"; }; 395 392 A29B0C130BD15F9D0006F230 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = macosx/Spanish.lproj/InfoWindow.nib; sourceTree = "<group>"; }; … … 413 410 A2A3065A0AAD24A80049E2AC /* UKMainThreadProxy.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = UKMainThreadProxy.m; path = macosx/UKKQueue/UKMainThreadProxy.m; sourceTree = "<group>"; }; 414 411 A2A84AD20A04FCDC00C898D4 /* BottomBorder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BottomBorder.png; path = macosx/Images/BottomBorder.png; sourceTree = "<group>"; }; 415 A2AA579A0ADFCAB400CA59F6 /* Pieces ImageView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PiecesImageView.h; path = macosx/PiecesImageView.h; sourceTree = "<group>"; };416 A2AA579B0ADFCAB400CA59F6 /* Pieces ImageView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PiecesImageView.m; path = macosx/PiecesImageView.m; sourceTree = "<group>"; };412 A2AA579A0ADFCAB400CA59F6 /* PiecesView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PiecesView.h; path = macosx/PiecesView.h; sourceTree = "<group>"; }; 413 A2AA579B0ADFCAB400CA59F6 /* PiecesView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PiecesView.m; path = macosx/PiecesView.m; sourceTree = "<group>"; }; 417 414 A2AF1C360A3D0F6200F1575D /* FileOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FileOutlineView.h; path = macosx/FileOutlineView.h; sourceTree = "<group>"; }; 418 415 A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileOutlineView.m; path = macosx/FileOutlineView.m; sourceTree = "<group>"; }; … … 888 885 A2A1CB770BF29D5500AE959F /* PeerProgressIndicatorCell.h */, 889 886 A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */, 890 A291DAAC0AC8BEB6003385E9 /* PiecesView.h */, 891 A291DAAD0AC8BEB6003385E9 /* PiecesView.m */, 892 A2AA579A0ADFCAB400CA59F6 /* PiecesImageView.h */, 893 A2AA579B0ADFCAB400CA59F6 /* PiecesImageView.m */, 887 A2AA579A0ADFCAB400CA59F6 /* PiecesView.h */, 888 A2AA579B0ADFCAB400CA59F6 /* PiecesView.m */, 894 889 ); 895 890 name = "Info Window"; … … 1266 1261 A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */, 1267 1262 A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */, 1268 A291DAAF0AC8BEB6003385E9 /* PiecesView.m in Sources */,1269 1263 A29C8B370ACC6EB3000ED9F9 /* PortChecker.m in Sources */, 1270 A2AA579D0ADFCAB400CA59F6 /* Pieces ImageView.m in Sources */,1264 A2AA579D0ADFCAB400CA59F6 /* PiecesView.m in Sources */, 1271 1265 A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */, 1272 1266 A21F5C040AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m in Sources */, -
trunk/macosx/English.lproj/InfoWindow.nib/classes.nib
r2149 r2171 78 78 SUPERCLASS = NSLevelIndicatorCell; 79 79 }, 80 { 81 CLASS = PiecesImageView; 82 LANGUAGE = ObjC; 83 OUTLETS = {fPiecesView = PiecesView; }; 84 SUPERCLASS = NSImageView; 85 }, 86 { 87 CLASS = PiecesView; 88 LANGUAGE = ObjC; 89 OUTLETS = {fImageView = NSImageView; }; 90 SUPERCLASS = NSObject; 91 } 80 {CLASS = PiecesView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; } 92 81 ); 93 82 IBVersion = 1; -
trunk/macosx/English.lproj/InfoWindow.nib/info.nib
r2149 r2171 25 25 </array> 26 26 <key>IBSystem Version</key> 27 <string>8 P135</string>27 <string>8R218</string> 28 28 </dict> 29 29 </plist> -
trunk/macosx/PiecesView.h
r2149 r2171 26 26 #import "Torrent.h" 27 27 28 @interface PiecesView : NS Object28 @interface PiecesView : NSImageView 29 29 { 30 30 int8_t * fPieces; … … 36 36 Torrent * fTorrent; 37 37 int fNumPieces, fAcross, fWidth, fExtraBorder; 38 39 IBOutlet NSImageView * fImageView;40 38 } 41 39 42 40 - (void) setTorrent: (Torrent *) torrent; 43 41 - (void) updateView: (BOOL) first; 44 - (void) toggleView;45 42 46 43 @end -
trunk/macosx/PiecesView.m
r2149 r2171 30 30 @implementation PiecesView 31 31 32 - (id) init 33 { 34 if ((self = [super init ]))32 - (id) initWithCoder: (NSCoder *) decoder 33 { 34 if ((self = [super initWithCoder: decoder])) 35 35 { 36 36 fTorrent = nil; … … 44 44 - (void) awakeFromNib 45 45 { 46 #warning NSRectFill 47 48 NSSize size = [fImageView bounds].size; 49 NSBezierPath * bp = [NSBezierPath bezierPathWithRect: [fImageView bounds]]; 46 NSSize size = [self bounds].size; 47 NSBezierPath * bp = [NSBezierPath bezierPathWithRect: [self bounds]]; 50 48 51 49 //back image … … 137 135 [fBluePiece unlockFocus]; 138 136 139 [ fImageViewsetToolTip: [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]137 [self setToolTip: [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"] 140 138 ? NSLocalizedString(@"Piece Availability", "Inspector -> Activity -> detailed pieces view tooltip") 141 139 : NSLocalizedString(@"Piece Progress", "Inspector -> Activity -> detailed pieces view tooltip")]; … … 190 188 fAcross = MAX_ACROSS; 191 189 192 float width = [ fImageViewbounds].size.width;190 float width = [self bounds].size.width; 193 191 fWidth = (width - (fAcross + 1) * BETWEEN) / fAcross; 194 192 fExtraBorder = (width - ((fWidth + BETWEEN) * fAcross + BETWEEN)) / 2; … … 197 195 } 198 196 199 [ fImageViewsetHidden: torrent == nil];197 [self setHidden: torrent == nil]; 200 198 } 201 199 … … 206 204 207 205 if (first) 208 [ fImageViewsetImage: [[fBack copy] autorelease]];209 NSImage * image = [ fImageViewimage];206 [self setImage: [[fBack copy] autorelease]]; 207 NSImage * image = [self image]; 210 208 211 209 int8_t * pieces; … … 370 368 { 371 369 [image unlockFocus]; 372 [ fImageViewsetNeedsDisplay];370 [self setNeedsDisplay]; 373 371 } 374 372 … … 379 377 } 380 378 381 - (void) toggleView 379 - (BOOL) acceptsFirstMouse: (NSEvent *) event 380 { 381 return YES; 382 } 383 384 - (void) mouseDown: (NSEvent *) event 382 385 { 383 386 NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; … … 386 389 [defaults setBool: showAvailability forKey: @"PiecesViewShowAvailability"]; 387 390 388 [ fImageViewsetToolTip: showAvailability391 [self setToolTip: showAvailability 389 392 ? NSLocalizedString(@"Piece Availability", "Inspector -> Activity -> detailed pieces view tooltip") 390 393 : NSLocalizedString(@"Piece Progress", "Inspector -> Activity -> detailed pieces view tooltip")]; 391 394 392 395 [self updateView: YES]; 396 397 [super mouseDown: event]; 393 398 } 394 399
Note: See TracChangeset
for help on using the changeset viewer.