Changeset 14290
- Timestamp:
- Jun 8, 2014, 10:16:01 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/makemeta.c
r14241 r14290 127 127 struct stat sb; 128 128 stat (topFile, &sb); 129 ret->is SingleFile = !S_ISDIR (sb.st_mode);129 ret->isFolder = S_ISDIR (sb.st_mode); 130 130 } 131 131 … … 335 335 tr_variantDictReserve (dict, 5); 336 336 337 if (builder->isSingleFile) 338 { 339 tr_variantDictAddInt (dict, TR_KEY_length, builder->files[0].size); 340 } 341 else /* root node is a directory */ 337 if (builder->isFolder) /* root node is a directory */ 342 338 { 343 339 uint32_t i; … … 351 347 getFileInfo (builder->top, &builder->files[i], length, pathVal); 352 348 } 349 } 350 else 351 { 352 tr_variantDictAddInt (dict, TR_KEY_length, builder->files[0].size); 353 353 } 354 354 -
trunk/libtransmission/makemeta.h
r14287 r14290 46 46 uint32_t pieceSize; 47 47 uint32_t pieceCount; 48 bool is SingleFile;48 bool isFolder; 49 49 50 50 /** -
trunk/libtransmission/transmission.h
r14225 r14290 1837 1837 /* Flags */ 1838 1838 bool isPrivate; 1839 bool is Multifile;1839 bool isFolder; 1840 1840 }; 1841 1841 -
trunk/macosx/Controller.m
r14223 r14290 954 954 //determine to show the options window 955 955 const BOOL showWindow = type == ADD_SHOW_OPTIONS || ([fDefaults boolForKey: @"DownloadAsk"] 956 && (info.is Multifile|| ![fDefaults boolForKey: @"DownloadAskMulti"])956 && (info.isFolder || ![fDefaults boolForKey: @"DownloadAskMulti"]) 957 957 && (type != ADD_AUTO || ![fDefaults boolForKey: @"DownloadAskManual"])); 958 958 tr_metainfoFree(&info); -
trunk/macosx/CreatorWindowController.m
r13492 r14290 151 151 [fNameField setToolTip: [fPath path]]; 152 152 153 const BOOL multifile = !fInfo->isSingleFile;153 const BOOL multifile = fInfo->isFolder; 154 154 155 155 NSImage * icon = [[NSWorkspace sharedWorkspace] iconForFileType: multifile -
trunk/macosx/DragOverlayWindow.m
r13340 r14290 111 111 { 112 112 name = [NSString stringWithUTF8String: info.name]; 113 folder = info.is Multifile;113 folder = info.isFolder; 114 114 } 115 115 } -
trunk/macosx/QuickLookPlugin/GeneratePreviewForURL.m
r13469 r14290 61 61 62 62 NSString * name = [NSString stringWithUTF8String: inf.name]; 63 NSString * fileTypeString = inf.is Multifile? NSFileTypeForHFSTypeCode(kGenericFolderIcon) : [name pathExtension];63 NSString * fileTypeString = inf.isFolder ? NSFileTypeForHFSTypeCode(kGenericFolderIcon) : [name pathExtension]; 64 64 65 65 const NSUInteger width = 32; … … 67 67 68 68 NSString * fileSizeString = [NSString stringForFileSize: inf.totalSize]; 69 if (inf.is Multifile)69 if (inf.isFolder) 70 70 { 71 71 NSString * fileCountString; … … 133 133 } 134 134 135 if (inf.is Multifile)135 if (inf.isFolder) 136 136 { 137 137 NSMutableString * listSection = [NSMutableString string]; -
trunk/macosx/Torrent.m
r14215 r14290 643 643 - (BOOL) isFolder 644 644 { 645 return fInfo->is Multifile;645 return fInfo->isFolder; 646 646 } 647 647
Note: See TracChangeset
for help on using the changeset viewer.