mirror of
https://github.com/transmission/transmission.git
synced 2026-04-23 18:29:54 +01:00
(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:
@@ -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>"];
|
||||
|
||||
Reference in New Issue
Block a user