Changeset 424
- Timestamp:
- Jun 21, 2006, 11:46:41 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Badger.m
r374 r424 45 45 46 46 NSShadow * stringShadow = [[NSShadow alloc] init]; 47 [stringShadow setShadowOffset: NSMakeSize(2 , -2)];48 [stringShadow setShadowBlurRadius: 4 ];47 [stringShadow setShadowOffset: NSMakeSize(2.0, -2.0)]; 48 [stringShadow setShadowBlurRadius: 4.0]; 49 49 50 50 fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: 51 51 [NSColor whiteColor], NSForegroundColorAttributeName, 52 [NSFont fontWithName: @"Helvetica-Bold" size: 28 ], NSFontAttributeName,52 [NSFont fontWithName: @"Helvetica-Bold" size: 28.0], NSFontAttributeName, 53 53 stringShadow, NSShadowAttributeName, nil]; 54 54 … … 66 66 [fDockIcon release]; 67 67 [fBadgedDockIcon release]; 68 69 68 [fAttributes release]; 70 69 … … 83 82 { 84 83 fCompleted = completed; 85 86 84 dockIcon = [fDockIcon copy]; 87 85 … … 126 124 if (speedShown) 127 125 { 128 NSRect badgeRect , stringRect;126 NSRect badgeRect; 129 127 badgeRect.size = [fUploadBadge size]; 130 128 badgeRect.origin = NSZeroPoint; 131 129 132 130 //ignore shadow of badge when placing string 131 NSRect stringRect = badgeRect; 133 132 float badgeBottomExtra = 2.0; 134 stringRect = badgeRect;135 133 stringRect.size.height -= badgeBottomExtra; 136 134 stringRect.origin.y += badgeBottomExtra; … … 178 176 179 177 [NSApp setApplicationIconImage: dockIcon]; 180 181 178 [dockIcon release]; 182 179 } -
trunk/macosx/Controller.m
r421 r424 320 320 [torrent setDownloadFolder: [[openPanel filenames] objectAtIndex: 0]]; 321 321 if ([fDefaults boolForKey: @"AutoStartDownload"]) 322 [torrent start ];322 [torrent startTransfer]; 323 323 [fTorrents addObject: torrent]; 324 324 … … 372 372 [torrent setDownloadFolder: folder]; 373 373 if (autoStart) 374 [torrent start ];374 [torrent startTransfer]; 375 375 [fTorrents addObject: torrent]; 376 376 } … … 462 462 - (void) resumeTorrentWithIndex: (NSIndexSet *) indexSet 463 463 { 464 Torrent * torrent;465 464 unsigned int i; 466 465 for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i]) 467 [[fTorrents objectAtIndex: i] start ];466 [[fTorrents objectAtIndex: i] startTransfer]; 468 467 469 468 [self updateUI: nil]; … … 485 484 { 486 485 unsigned int i; 487 Torrent * torrent;488 486 for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i]) 489 { 490 torrent = [fTorrents objectAtIndex: i]; 491 [torrent stop]; 492 } 487 [[fTorrents objectAtIndex: i] stopTransfer]; 493 488 494 489 [self updateUI: nil]; … … 540 535 } 541 536 542 NSBeginAlertSheet(title, 543 @"Remove", @"Cancel", nil, fWindow, self, 537 NSBeginAlertSheet(title, @"Remove", @"Cancel", nil, fWindow, self, 544 538 @selector(removeSheetDidEnd:returnCode:contextInfo:), nil, dict, message); 545 539 } … … 571 565 while ((torrent = [enumerator nextObject])) 572 566 { 573 [torrent stop ];567 [torrent stopTransfer]; 574 568 575 569 if (deleteData) … … 670 664 - (void) revealFile: (id) sender 671 665 { 672 Torrent * torrent;673 666 NSIndexSet * indexSet = [fTableView selectedRowIndexes]; 674 667 unsigned int i; 675 668 676 669 for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i]) 677 { 678 torrent = [fTorrents objectAtIndex: i]; 679 [torrent reveal]; 680 } 670 [[fTorrents objectAtIndex: i] revealData]; 681 671 } 682 672 -
trunk/macosx/StringAdditions.m
r423 r424 65 65 } 66 66 67 NSString * value;67 NSString * sizeString; 68 68 //attempt to have values with 3 digits 69 69 if (convertedSize < 10.0) 70 value= [NSString stringWithFormat: @"%.2f", convertedSize];70 sizeString = [NSString stringWithFormat: @"%.2f", convertedSize]; 71 71 else if (convertedSize < 100.0) 72 value= [NSString stringWithFormat: @"%.1f", convertedSize];72 sizeString = [NSString stringWithFormat: @"%.1f", convertedSize]; 73 73 else 74 value= [NSString stringWithFormat: @"%.0f", convertedSize];74 sizeString = [NSString stringWithFormat: @"%.0f", convertedSize]; 75 75 76 return [ valuestringByAppendingString: unit];76 return [sizeString stringByAppendingString: unit]; 77 77 } 78 78 -
trunk/macosx/Torrent.h
r421 r424 63 63 64 64 - (void) update; 65 - (void) start ;66 - (void) stop ;65 - (void) startTransfer; 66 - (void) stopTransfer; 67 67 - (void) removeForever; 68 68 - (void) sleep; … … 75 75 - (void) setRatioLimit: (float) limit; 76 76 77 - (void) reveal ;77 - (void) revealData; 78 78 - (void) trashData; 79 79 - (void) trashTorrent; -
trunk/macosx/Torrent.m
r421 r424 72 72 NSString * paused; 73 73 if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"]) 74 [self start ];74 [self startTransfer]; 75 75 } 76 76 return self; … … 138 138 && [self ratio] >= [fDefaults floatForKey: @"RatioLimit"]))) 139 139 { 140 [self stop ];140 [self stopTransfer]; 141 141 [self setStopRatioSetting: RATIO_NO_CHECK]; 142 142 fFinishedSeeding = YES; … … 217 217 } 218 218 219 - (void) start 219 - (void) startTransfer 220 220 { 221 221 if (![self isActive]) … … 226 226 } 227 227 228 - (void) stop 228 - (void) stopTransfer 229 229 { 230 230 if ([self isActive]) … … 234 234 - (void) removeForever 235 235 { 236 if (f Info->flags & TR_FSAVEPRIVATE)236 if (fPrivateTorrent) 237 237 tr_torrentRemoveSaved(fHandle); 238 238 } … … 241 241 { 242 242 if ((fResumeOnWake = [self isActive])) 243 [self stop ];243 [self stopTransfer]; 244 244 } 245 245 … … 247 247 { 248 248 if (fResumeOnWake) 249 [self start ];249 [self startTransfer]; 250 250 } 251 251 … … 277 277 } 278 278 279 - (void) reveal 279 - (void) revealData 280 280 { 281 281 [[NSWorkspace sharedWorkspace] selectFile: [self dataLocation] inFileViewerRootedAtPath: nil]; -
trunk/macosx/TorrentTableView.m
r421 r424 55 55 fRevealOnIcon = [NSImage imageNamed: @"RevealOn.png"]; 56 56 fRevealOffIcon = [NSImage imageNamed: @"RevealOff.png"]; 57 58 fClickPoint = NSZeroPoint; 57 59 } 58 60 … … 104 106 } 105 107 else if (sameRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint]) 106 [[fTorrents objectAtIndex: row] reveal ];108 [[fTorrents objectAtIndex: row] revealData]; 107 109 else if ([event clickCount] == 2) 108 110 { 109 111 if ([self pointInIconRect: point]) 110 [[fTorrents objectAtIndex: row] reveal ];112 [[fTorrents objectAtIndex: row] revealData]; 111 113 else 112 114 [fController showInfo: nil];
Note: See TracChangeset
for help on using the changeset viewer.