Changeset 94
- Timestamp:
- Feb 7, 2006, 5:02:45 AM (17 years ago)
- Location:
- trunk/macosx
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r59 r94 50 50 51 51 IBOutlet NSWindow * fWindow; 52 IBOutlet NSScrollView * fScrollView; 52 53 IBOutlet TorrentTableView * fTableView; 53 54 IBOutlet NSTextField * fTotalDLField; -
trunk/macosx/Controller.m
r92 r94 966 966 967 967 rectWin = [fWindow frame]; 968 rectView = [[fWindow contentView] frame]; 969 foo = 47.0 + MAX( 1, tr_torrentCount( fHandle ) ) * 62.0 - 970 rectView.size.height; 968 rectView = [fScrollView frame]; 969 foo = 25.0 + MAX( 1, fCount ) * ( [fTableView rowHeight] + 970 [fTableView intercellSpacing].height ) - 971 rectView.size.height; 971 972 972 973 rectWin.size.height += foo; -
trunk/macosx/English.lproj/MainMenu.nib/classes.nib
r58 r94 48 48 fRemoveTorrentItem = NSMenuItem; 49 49 fRevealItem = NSMenuItem; 50 fScrollView = NSScrollView; 50 51 fShowHideToolbar = NSMenuItem; 51 52 fTableView = TorrentTableView; -
trunk/macosx/English.lproj/MainMenu.nib/info.nib
r58 r94 16 16 <string>54 521 112 118 0 0 1152 842 </string> 17 17 <key>783</key> 18 <string> 387 422 470 265 0 0 1280 832</string>18 <string>456 452 470 265 0 0 1440 878 </string> 19 19 <key>796</key> 20 20 <string>412 490 470 129 0 0 1280 832 </string> … … 26 26 <key>IBOldestOS</key> 27 27 <integer>3</integer> 28 <key>IBOpenObjects</key>29 <array>30 <integer>783</integer>31 </array>32 28 <key>IBSystem Version</key> 33 <string>8 G32</string>29 <string>8F1111g</string> 34 30 </dict> 35 31 </plist> -
trunk/macosx/NameCell.m
r74 r94 35 35 [NSString stringForFileSize: stat->info.totalSize]]; 36 36 37 if( stat->folder ) 38 fIcon = [[NSWorkspace sharedWorkspace] iconForFile: 39 [[NSString stringWithUTF8String: stat->folder] 40 stringByAppendingPathComponent: fNameString]]; 37 if( stat->info.fileCount > 1 ) 38 fIcon = [[NSWorkspace sharedWorkspace] iconForFileType: 39 NSFileTypeForHFSTypeCode('fldr')]; 41 40 else 42 /* XXX The torrent is still being opened, the destination hasn't 43 been chosen yet. It shouldn't be added to the table view so 44 soon */ 45 fIcon = [[NSWorkspace sharedWorkspace] iconForFile: @"/System"]; 41 fIcon = [[NSWorkspace sharedWorkspace] iconForFileType: 42 [fNameString pathExtension]]; 46 43 [fIcon setFlipped: YES]; 47 44 -
trunk/macosx/ProgressCell.m
r37 r94 123 123 124 124 /* Update the strings to be displayed */ 125 fDlString = [@"DL: " stringByAppendingString: 126 [NSString stringForSpeed: fStat->rateDownload]]; 125 if( fStat->progress == 1.0 ) 126 fDlString = [@"Ratio: " stringByAppendingString: 127 [NSString stringForRatio: fStat->downloaded 128 upload: fStat->uploaded]]; 129 else 130 fDlString = [@"DL: " stringByAppendingString: 131 [NSString stringForSpeed: fStat->rateDownload]]; 127 132 fUlString = [@"UL: " stringByAppendingString: 128 133 [NSString stringForSpeed: fStat->rateUpload]]; -
trunk/macosx/StringAdditions.h
r34 r94 13 13 + (NSString *) stringForFileSize: (uint64_t) size; 14 14 + (NSString *) stringForSpeed: (float) speed; 15 + (NSString *) stringForRatio: (uint64_t) down upload: (uint64_t) up; 15 16 - (NSString *) stringFittingInWidth: (float) width 16 17 withAttributes: (NSDictionary *) attributes; -
trunk/macosx/StringAdditions.m
r34 r94 37 37 } 38 38 39 + (NSString *) stringForRatio: (uint64_t) down upload: (uint64_t) up; 40 { 41 if( !down && !up ) 42 return @"N/A"; 43 if( !down ) 44 return @"Inf."; 45 46 float ratio = (float) up / (float) down; 47 if( ratio < 10.0 ) 48 return [NSString stringWithFormat: @"%.2f", ratio]; 49 else if( ratio < 100.0 ) 50 return [NSString stringWithFormat: @"%.1f", ratio]; 51 else 52 return [NSString stringWithFormat: @"%.0f", ratio]; 53 } 54 39 55 - (NSString *) stringFittingInWidth: (float) width 40 56 withAttributes: (NSDictionary *) attributes
Note: See TracChangeset
for help on using the changeset viewer.