(trunk) replace the tr_metainfo_builder.isSingleFile and tr_info.isMultifile fields an 'isFolder' bool in both structs.

This makes the variable naming more uniform. It also clarifies the information we're really trying to convey -- previously, isSingleFile was false whenever the torrent held a directory tree, even if there was only a single file in the tree.

Sync the Mac OS X client's use to match the libtransmission variable names.
This commit is contained in:
Jordan Lee
2014-06-08 22:16:01 +00:00
parent db8a589ec4
commit e40a7d5359
8 changed files with 15 additions and 15 deletions

View File

@@ -60,13 +60,13 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
NSMutableDictionary * allImgProps = [NSMutableDictionary dictionary];
NSString * name = [NSString stringWithUTF8String: inf.name];
NSString * fileTypeString = inf.isMultifile ? NSFileTypeForHFSTypeCode(kGenericFolderIcon) : [name pathExtension];
NSString * fileTypeString = inf.isFolder ? NSFileTypeForHFSTypeCode(kGenericFolderIcon) : [name pathExtension];
const NSUInteger width = 32;
[htmlString appendFormat: @"<h2><img class=\"icon\" src=\"%@\" width=\"%ld\" height=\"%ld\" />%@</h2>", generateIconData(fileTypeString, width, allImgProps), width, width, name];
NSString * fileSizeString = [NSString stringForFileSize: inf.totalSize];
if (inf.isMultifile)
if (inf.isFolder)
{
NSString * fileCountString;
if (inf.fileCount == 1)
@@ -132,7 +132,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
[lists addObject: listSection];
}
if (inf.isMultifile)
if (inf.isFolder)
{
NSMutableString * listSection = [NSMutableString string];
[listSection appendString: @"<table>"];