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];
|
NSBrowserCell * browserCell = [[[NSBrowserCell alloc] init] autorelease];
|
||||||
[browserCell setLeaf: YES];
|
[browserCell setLeaf: YES];
|
||||||
[[fFileOutline tableColumnWithIdentifier: @"Name"] setDataCell: browserCell];
|
[[fFileOutline tableColumnWithIdentifier: @"Name"] setDataCell: browserCell];
|
||||||
|
|
||||||
[fFileOutline setDoubleAction: @selector(revealFile:)];
|
[fFileOutline setDoubleAction: @selector(revealFile:)];
|
||||||
|
|
||||||
|
//set blank inspector
|
||||||
[self updateInfoForTorrents: [NSArray array]];
|
[self updateInfoForTorrents: [NSArray array]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,13 +265,13 @@
|
||||||
[fFiles release];
|
[fFiles release];
|
||||||
fFiles = [[torrent fileList] retain];
|
fFiles = [[torrent fileList] retain];
|
||||||
|
|
||||||
#warning change!
|
int fileCount = [torrent fileCount];
|
||||||
if ([fFiles count] > 1)
|
if (fileCount != 1)
|
||||||
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files",
|
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files total",
|
||||||
"Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]];
|
"Inspector -> Files tab -> bottom text (number of files)"), fileCount]];
|
||||||
else
|
else
|
||||||
[fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d file",
|
[fFileTableStatusField setStringValue: NSLocalizedString(@"1 file total",
|
||||||
"Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]];
|
"Inspector -> Files tab -> bottom text (number of files)")];
|
||||||
}
|
}
|
||||||
|
|
||||||
//update stats and settings
|
//update stats and settings
|
||||||
|
|
|
@ -180,6 +180,7 @@
|
||||||
- (void) setOrderValue: (int) orderValue;
|
- (void) setOrderValue: (int) orderValue;
|
||||||
|
|
||||||
- (NSArray *) fileList;
|
- (NSArray *) fileList;
|
||||||
|
- (int) fileCount;
|
||||||
|
|
||||||
- (NSDate *) date;
|
- (NSDate *) date;
|
||||||
- (NSNumber *) stateSortKey;
|
- (NSNumber *) stateSortKey;
|
||||||
|
|
|
@ -1066,7 +1066,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
- (NSArray *) fileList
|
- (NSArray *) fileList
|
||||||
{
|
{
|
||||||
int count = fInfo->fileCount, i;
|
int count = [self fileCount], i;
|
||||||
tr_file_t file;
|
tr_file_t file;
|
||||||
NSMutableArray * files = [NSMutableArray array];
|
NSMutableArray * files = [NSMutableArray array];
|
||||||
|
|
||||||
|
@ -1082,6 +1082,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) fileCount
|
||||||
|
{
|
||||||
|
return fInfo->fileCount;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSDate *) date
|
- (NSDate *) date
|
||||||
{
|
{
|
||||||
return fDate;
|
return fDate;
|
||||||
|
|
Loading…
Add table
Reference in a new issue