diff --git a/macosx/Defaults.plist b/macosx/Defaults.plist index be7c0f97a..62a8efee3 100644 --- a/macosx/Defaults.plist +++ b/macosx/Defaults.plist @@ -174,8 +174,6 @@ 50 UseIncompleteDownloadFolder - WarningCheckContentsForRemove - WarningCreatorBlankAddress WarningDuplicate diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 54b13f38a..6c833898d 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -635,7 +635,6 @@ tr_session * fHandle; [fDefaults removeObjectForKey: @"WarningCreatorBlankAddress"]; [fDefaults removeObjectForKey: @"WarningRemoveBuiltInTracker"]; [fDefaults removeObjectForKey: @"WarningInvalidOpen"]; - [fDefaults removeObjectForKey: @"WarningCheckContentsForRemove"]; } - (void) setQueue: (id) sender diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 1b8485485..da081990c 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -453,72 +453,6 @@ void completenessChangeCallback(tr_torrent * torrent, tr_completeness status, vo - (void) trashData { - if ([self isFolder] && [fDefaults boolForKey: @"WarningCheckContentsForRemove"]) - { - NSEnumerator * enumerator = [[NSFileManager defaultManager] enumeratorAtPath: [self dataLocation]]; - NSString * file; - while ((file = [enumerator nextObject])) - { - NSArray * actualComponents = [file pathComponents]; - if ([[actualComponents lastObject] hasPrefix: @"."]) - continue; - - BOOL isExtra = YES; - - NSEnumerator * nodeEnumerator = [fFlatFileList objectEnumerator]; - FileListNode * node; - while ((node = [nodeEnumerator nextObject])) - { - NSArray * listedComponents = [[node fullPath] pathComponents]; - if ([listedComponents count]-1 < [actualComponents count]) - continue; - - //remove first component (the folder name) and only include the same number of levels - listedComponents = [listedComponents objectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: - NSMakeRange(1, [actualComponents count])]]; - - if ([listedComponents isEqualToArray: actualComponents]) - { - isExtra = NO; - break; - } - } - - if (!isExtra) - continue; - - NSLog(@"Extra file found: %@", file); - - NSAlert * alert = [[NSAlert alloc] init]; - [alert setMessageText: [NSString stringWithFormat: NSLocalizedString(@"\"%@\" contains extra content.", - "Delete folder with extra contents -> title"), [self name]]]; - [alert setInformativeText: NSLocalizedString(@"The directory contains data that is not part of the transfer." - " Are you sure you want to move this directory to the trash?", "Delete folder with extra contents -> message")]; - [alert addButtonWithTitle: NSLocalizedString(@"Trash", "Delete folder with extra contents -> button")]; - [alert addButtonWithTitle: NSLocalizedString(@"Keep", "Delete folder with extra contents -> button")]; - - BOOL onLeopard = [NSApp isOnLeopardOrBetter]; - if (onLeopard) - { - [alert setShowsSuppressionButton: YES]; - [[alert suppressionButton] setTitle: NSLocalizedString(@"Do not check directory contents again", - "Delete folder with extra contents -> button")]; - } - else - [alert addButtonWithTitle: NSLocalizedString(@"Never Check", "Delete folder with extra contents -> button")]; - - NSInteger result = [alert runModal]; - if ((onLeopard ? [[alert suppressionButton] state] == NSOnState : result == NSAlertThirdButtonReturn)) - [fDefaults setBool: NO forKey: @"WarningCheckContentsForRemove"]; - [alert release]; - - if (result == NSAlertSecondButtonReturn) - return; - else - break; - } - } - [self trashFile: [self dataLocation]]; } diff --git a/macosx/en.lproj/Localizable.strings b/macosx/en.lproj/Localizable.strings index 197593235..08f5e47d7 100644 Binary files a/macosx/en.lproj/Localizable.strings and b/macosx/en.lproj/Localizable.strings differ