Changeset 3955
- Timestamp:
- Nov 25, 2007, 4:06:26 AM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/DragOverlayWindow.m
r3851 r3955 116 116 else 117 117 fileString= [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", "Drag overlay -> torrents"), fileCount]; 118 118 secondString = [fileString stringByAppendingString: secondString]; 119 119 } 120 120 -
trunk/macosx/English.lproj/InfoWindow.nib/classes.nib
r3745 r3955 121 121 <key>fActivityView</key> 122 122 <string>NSView</string> 123 <key>fBasicInfoField</key> 124 <string>NSTextField</string> 123 125 <key>fCommentView</key> 124 126 <string>NSTextView</string> … … 163 165 <key>fFilePriorityNormal</key> 164 166 <string>NSMenuItem</string> 165 <key>fFileTableStatusField</key>166 <string>NSTextField</string>167 167 <key>fFileUncheckItem</key> 168 168 <string>NSMenuItem</string> … … 213 213 <key>fSeedersField</key> 214 214 <string>NSTextField</string> 215 <key>fSizeField</key>216 <string>NSTextField</string>217 215 <key>fStateField</key> 218 216 <string>NSTextField</string> -
trunk/macosx/English.lproj/InfoWindow.nib/info.nib
r3950 r3955 11 11 <key>IBOpenObjects</key> 12 12 <array> 13 <integer> 995</integer>13 <integer>6</integer> 14 14 </array> 15 15 <key>IBSystem Version</key> -
trunk/macosx/InfoWindowController.h
r3745 r3955 38 38 39 39 IBOutlet NSImageView * fImageView; 40 IBOutlet NSTextField * fNameField, * fSizeField, * fTrackerField, 41 * fPiecesField, * fHashField, * fSecureField, 40 IBOutlet NSTextField * fNameField, * fBasicInfoField; 41 42 IBOutlet NSTextField * fTrackerField, * fPiecesField, * fHashField, * fSecureField, 42 43 * fTorrentLocationField, * fDataLocationField, 43 44 * fDateAddedField, * fDateCompletedField, * fDateActivityField, … … 57 58 58 59 IBOutlet FileOutlineView * fFileOutline; 59 IBOutlet NSTextField * fFileTableStatusField;60 60 IBOutlet NSMenuItem * fFileCheckItem, * fFileUncheckItem, 61 61 * fFilePriorityNormal, * fFilePriorityHigh, * fFilePriorityLow; -
trunk/macosx/InfoWindowController.m
r3902 r3955 196 196 197 197 uint64_t size = 0; 198 int fileCount = 0; 198 199 NSEnumerator * enumerator = [torrents objectEnumerator]; 199 200 Torrent * torrent; 200 201 while ((torrent = [enumerator nextObject])) 202 { 201 203 size += [torrent size]; 204 fileCount += [torrent fileCount]; 205 } 202 206 203 [f SizeField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ Total",204 "Inspector -> above tabs -> total size (several torrents selected)"), [NSString stringForFileSize: size]]];207 [fBasicInfoField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d Files, %@ Total", 208 "Inspector -> torrents"), fileCount, [NSString stringForFileSize: size]]]; 205 209 } 206 210 else … … 209 213 210 214 [fNameField setStringValue: NSLocalizedString(@"No Torrents Selected", "Inspector -> above tabs -> selected torrents")]; 211 [f SizeField setStringValue: @""];215 [fBasicInfoField setStringValue: @""]; 212 216 213 217 [fHaveField setStringValue: @""]; … … 306 310 fFiles = nil; 307 311 } 308 [fFileTableStatusField setStringValue: NSLocalizedString(@"info not available",309 "Inspector -> Files tab -> bottom text (number of files)")];310 312 } 311 313 else … … 323 325 [fNameField setStringValue: name]; 324 326 [fNameField setToolTip: name]; 325 [fSizeField setStringValue: [NSString stringForFileSize: [torrent size]]]; 327 328 NSString * basicString = [NSString stringForFileSize: [torrent size]]; 329 if ([torrent folder]) 330 { 331 NSString * fileString; 332 int fileCount = [torrent fileCount]; 333 if (fileCount == 1) 334 fileString = NSLocalizedString(@"1 File, ", "Inspector -> above tabs -> selected torrents"); 335 else 336 fileString= [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", 337 "Inspector -> above tabs -> selected torrents"), fileCount]; 338 basicString = [fileString stringByAppendingString: basicString]; 339 } 340 [fBasicInfoField setStringValue: basicString]; 326 341 327 342 NSArray * allTrackers = [torrent allTrackers], * subTrackers; … … 382 397 [fFiles release]; 383 398 fFiles = [[torrent fileList] retain]; 384 385 int fileCount = [torrent fileCount];386 if (fileCount != 1)387 [fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files total",388 "Inspector -> Files tab -> bottom text (number of files)"), fileCount]];389 else390 [fFileTableStatusField setStringValue: NSLocalizedString(@"1 file total",391 "Inspector -> Files tab -> bottom text (number of files)")];392 399 } 393 400 -
trunk/macosx/Torrent.h
r3950 r3955 130 130 131 131 - (NSString *) name; 132 - (BOOL) folder; 132 133 - (uint64_t) size; 133 134 - (uint64_t) sizeLeft; -
trunk/macosx/Torrent.m
r3948 r3955 594 594 if (!fIcon) 595 595 { 596 fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: fInfo->isMultifile? NSFileTypeForHFSTypeCode('fldr')596 fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [self folder] ? NSFileTypeForHFSTypeCode('fldr') 597 597 : [[self name] pathExtension]] retain]; 598 598 [fIcon setFlipped: YES]; … … 604 604 { 605 605 return [NSString stringWithUTF8String: fInfo->name]; 606 } 607 608 - (BOOL) folder 609 { 610 return fInfo->isMultifile; 606 611 } 607 612 … … 1516 1521 1517 1522 pathComponents = [[[NSString stringWithUTF8String: file->name] pathComponents] mutableCopy]; 1518 if ( fInfo->isMultifile)1523 if ([self folder]) 1519 1524 { 1520 1525 path = [pathComponents objectAtIndex: 0];
Note: See TracChangeset
for help on using the changeset viewer.