]> granicus.if.org Git - transmission/commitdiff
"isFolder" is a better method name than "folder"
authorMitchell Livingston <livings124@transmissionbt.com>
Thu, 29 May 2008 22:16:03 +0000 (22:16 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Thu, 29 May 2008 22:16:03 +0000 (22:16 +0000)
macosx/AddWindowController.m
macosx/Controller.m
macosx/InfoWindowController.m
macosx/Torrent.h
macosx/Torrent.m

index 27c25febf1da21ecf7630e5ac9ad0530d111c228..dd94ef8e9cbb0d5f83bdc3dc9f455609d83be4d8 100644 (file)
 - (void) updateStatusField: (NSNotification *) notification
 {
     NSString * statusString = [NSString stringForFileSize: [fTorrent size]];
-    if ([fTorrent folder])
+    if ([fTorrent isFolder])
     {
         NSString * fileString;
         int count = [fTorrent fileCount];
index 23b5be38ef51c736a3d8ce121878765246aa9fd1..3eca2a6e17fab1bc99c92e71322012cc5a9e3ff2 100644 (file)
@@ -4060,7 +4060,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
     
     while ((torrent = [enumerator nextObject]))
     {
-        if ([torrent folder] || [torrent isComplete])
+        if ([torrent isFolder] || [torrent isComplete])
             [urlArray addObject: [NSURL fileURLWithPath: [torrent dataLocation]]];
     }
     
@@ -4075,7 +4075,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
     
     while ((torrent = [enumerator nextObject]))
     {
-        if ([torrent folder] || [torrent isComplete])
+        if ([torrent isFolder] || [torrent isComplete])
             return YES;
     }
     
index 0cc6ff533f6ba1ff664364d537b97788d8921ac9..1a348fc7ca36c9bc2c0ebfc2ce1a01c8e7083100 100644 (file)
@@ -363,7 +363,7 @@ typedef enum
         [fNameField setToolTip: name];
         
         NSString * basicString = [NSString stringForFileSize: [torrent size]];
-        if ([torrent folder])
+        if ([torrent isFolder])
         {
             NSString * fileString;
             int fileCount = [torrent fileCount];
@@ -1176,7 +1176,7 @@ typedef enum
         
         [fStateField setStringValue: [torrent stateString]];
         
-        if ([torrent folder])
+        if ([torrent isFolder])
             [fProgressField setStringValue: [NSString localizedStringWithFormat: NSLocalizedString(@"%.2f%% (%.2f%% selected)",
                 "Inspector -> Activity tab -> progress"), 100.0 * [torrent progress], 100.0 * [torrent progressDone]]];
         else
index b5847686da30369530737b8f37516ccf7ae87258..b13a1b5507274817fb678fdba829aa63dcb9efcb 100644 (file)
@@ -134,7 +134,7 @@ typedef enum
 - (NSImage *) icon;
 
 - (NSString *) name;
-- (BOOL) folder;
+- (BOOL) isFolder;
 - (uint64_t) size;
 - (uint64_t) sizeLeft;
 
index 5c1e890a960d290672a735a6c0e286baab9add8f..50ed2f83d125a9a2ecce7a686ad9517c5b70012b 100644 (file)
@@ -699,7 +699,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
 {
     if (!fIcon)
     {
-        fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [self folder] ? NSFileTypeForHFSTypeCode('fldr')
+        fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [self isFolder] ? NSFileTypeForHFSTypeCode('fldr')
                                                 : [[self name] pathExtension]] retain];
         [fIcon setFlipped: YES];
     }
@@ -711,7 +711,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
     return fNameString;
 }
 
-- (BOOL) folder
+- (BOOL) isFolder
 {
     return fInfo->isMultifile;
 }
@@ -990,7 +990,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
     if (![self allDownloaded])
     {
         float progress;
-        if ([self folder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
+        if ([self isFolder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
         {
             string = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@ selected", "Torrent -> progress string"),
                         [NSString stringForFileSize: [self haveTotal]], [NSString stringForFileSize: [self totalSizeSelected]]];
@@ -1651,7 +1651,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
 
 - (void) createFileList
 {
-    if ([self folder])
+    if ([self isFolder])
     {
         int count = [self fileCount], i;
         NSMutableArray * fileList = [[NSMutableArray alloc] initWithCapacity: count];