mirror of
https://github.com/transmission/transmission
synced 2025-03-10 06:02:57 +00:00
show accurate number of total files
This commit is contained in:
parent
b7e3c9af5a
commit
091aec4abe
4 changed files with 15 additions and 7 deletions
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -95,8 +95,10 @@
|
|||
NSBrowserCell * browserCell = [[[NSBrowserCell alloc] init] autorelease];
|
||||
[browserCell setLeaf: YES];
|
||||
[[fFileOutline tableColumnWithIdentifier: @"Name"] setDataCell: browserCell];
|
||||
|
||||
[fFileOutline setDoubleAction: @selector(revealFile:)];
|
||||
|
||||
//set blank inspector
|
||||
[self updateInfoForTorrents: [NSArray array]];
|
||||
}
|
||||
|
||||
|
@ -263,13 +265,13 @@
|
|||
[fFiles release];
|
||||
fFiles = [[torrent fileList] retain];
|
||||
|
||||
#warning change!
|
||||
if ([fFiles count] > 1)
|
||||
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files",
|
||||
"Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]];
|
||||
int fileCount = [torrent fileCount];
|
||||
if (fileCount != 1)
|
||||
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files total",
|
||||
"Inspector -> Files tab -> bottom text (number of files)"), fileCount]];
|
||||
else
|
||||
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d file",
|
||||
"Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]];
|
||||
[fFileTableStatusField setStringValue: NSLocalizedString(@"1 file total",
|
||||
"Inspector -> Files tab -> bottom text (number of files)")];
|
||||
}
|
||||
|
||||
//update stats and settings
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
- (void) setOrderValue: (int) orderValue;
|
||||
|
||||
- (NSArray *) fileList;
|
||||
- (int) fileCount;
|
||||
|
||||
- (NSDate *) date;
|
||||
- (NSNumber *) stateSortKey;
|
||||
|
|
|
@ -1066,7 +1066,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
|
||||
- (NSArray *) fileList
|
||||
{
|
||||
int count = fInfo->fileCount, i;
|
||||
int count = [self fileCount], i;
|
||||
tr_file_t file;
|
||||
NSMutableArray * files = [NSMutableArray array];
|
||||
|
||||
|
@ -1082,6 +1082,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
return files;
|
||||
}
|
||||
|
||||
- (int) fileCount
|
||||
{
|
||||
return fInfo->fileCount;
|
||||
}
|
||||
|
||||
- (NSDate *) date
|
||||
{
|
||||
return fDate;
|
||||
|
|
Loading…
Add table
Reference in a new issue