Merge branch 'master' into macos-11

This commit is contained in:
Mitch Livingston 2020-11-30 18:06:20 -05:00 committed by GitHub
commit de3f53131c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
117 changed files with 430 additions and 450 deletions

View File

@ -40,8 +40,6 @@
- (void) setGroupsMenu;
- (void) changeGroupValue: (id) sender;
- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo;
@end
@implementation AddMagnetWindowController
@ -210,8 +208,13 @@
[alert addButtonWithTitle: NSLocalizedString(@"Add", "Add torrent -> same name -> button")];
[alert setShowsSuppressionButton: YES];
[alert beginSheetModalForWindow: [self window] modalDelegate: self
didEndSelector: @selector(sameNameAlertDidEnd:returnCode:contextInfo:) contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) {
if ([[alert suppressionButton] state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningFolderDataSameName"];
if (returnCode == NSAlertSecondButtonReturn)
[self performSelectorOnMainThread: @selector(confirmAdd) withObject: nil waitUntilDone: NO];
}];
}
else
[self confirmAdd];
@ -306,14 +309,4 @@
else;
}
- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo
{
if ([[alert suppressionButton] state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningFolderDataSameName"];
if (returnCode == NSAlertSecondButtonReturn)
[self performSelectorOnMainThread: @selector(confirmAdd) withObject: nil waitUntilDone: NO];
}
@end

View File

@ -45,8 +45,6 @@
- (void) setGroupsMenu;
- (void) changeGroupValue: (id) sender;
- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo;
@end
@implementation AddWindowController
@ -200,8 +198,13 @@
[alert addButtonWithTitle: NSLocalizedString(@"Add", "Add torrent -> same name -> button")];
[alert setShowsSuppressionButton: YES];
[alert beginSheetModalForWindow: [self window] modalDelegate: self
didEndSelector: @selector(sameNameAlertDidEnd:returnCode:contextInfo:) contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) {
if ([[alert suppressionButton] state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningFolderDataSameName"];
if (returnCode == NSAlertSecondButtonReturn)
[self performSelectorOnMainThread: @selector(confirmAdd) withObject: nil waitUntilDone: NO];
}];
}
else
[self confirmAdd];
@ -384,14 +387,4 @@
}
}
- (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo
{
if ([[alert suppressionButton] state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningFolderDataSameName"];
if (returnCode == NSAlertSecondButtonReturn)
[self performSelectorOnMainThread: @selector(confirmAdd) withObject: nil waitUntilDone: NO];
}
@end

View File

@ -29,7 +29,6 @@
- (id) initWithPrefsController: (PrefsController *) prefsController;
- (void) startDownload;
- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info;
@end
@ -118,8 +117,11 @@ BlocklistDownloaderViewController * fBLViewController = nil;
[alert setInformativeText: error];
[alert beginSheetModalForWindow: [fPrefsController window] modalDelegate: self
didEndSelector: @selector(failureSheetClosed:returnCode:contextInfo:) contextInfo: nil];
[alert beginSheetModalForWindow:[fPrefsController window] completionHandler:^(NSModalResponse returnCode) {
[[alert window] orderOut: self];
fBLViewController = nil;
}];
}
@end
@ -147,11 +149,4 @@ BlocklistDownloaderViewController * fBLViewController = nil;
[NSApp beginSheet: fStatusWindow modalForWindow: [fPrefsController window] modalDelegate: nil didEndSelector: nil contextInfo: nil];
}
- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info
{
[[alert window] orderOut: self];
fBLViewController = nil;
}
@end

View File

@ -129,8 +129,6 @@ typedef enum
- (void) openURL: (NSString *) urlString;
- (void) openURLShowSheet: (id) sender;
- (void) quitSheetDidEnd: (NSWindow *) sheet returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo;
- (tr_session *) sessionHandle;
- (void) createFile: (id) sender;
@ -148,8 +146,6 @@ typedef enum
- (void) stopTorrents: (NSArray *) torrents;
- (void) removeTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData;
- (void) removeSheetDidEnd: (NSWindow *) sheet returnCode: (NSInteger) returnCode
contextInfo: (void *) contextInfo;
- (void) confirmRemoveTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData;
- (void) removeNoDelete: (id) sender;
- (void) removeDeleteData: (id) sender;

View File

@ -858,11 +858,15 @@ static void removeKeRangerRansomware()
fPendingTorrentDownloads = nil;
}
NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Download not a torrent -> title"),
[NSString stringWithFormat: NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.",
"Download not a torrent -> message"), suggestedName,
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]],
NSLocalizedString(@"OK", "Download not a torrent -> button"), nil, nil);
NSString * message = [NSString stringWithFormat: NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.",
"Download not a torrent -> message"), suggestedName,
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
NSAlert * alert = [[NSAlert alloc] init];
[alert addButtonWithTitle: NSLocalizedString(@"OK", "Download not a torrent -> button")];
[alert setMessageText: NSLocalizedString(@"Torrent download failed", "Download not a torrent -> title")];
[alert setInformativeText: message];
[alert runModal];
}
else
[download setDestination: [NSTemporaryDirectory() stringByAppendingPathComponent: [suggestedName lastPathComponent]]
@ -877,11 +881,16 @@ static void removeKeRangerRansomware()
- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
{
NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Torrent download error -> title"),
[NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@: %@.",
"Torrent download failed -> message"),
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
[error localizedDescription]], NSLocalizedString(@"OK", "Torrent download failed -> button"), nil, nil);
NSString * message = [NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@: %@.",
"Torrent download failed -> message"),
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
[error localizedDescription]];
NSAlert * alert = [[NSAlert alloc] init];
[alert addButtonWithTitle: NSLocalizedString(@"OK", "Torrent download failed -> button")];
[alert setMessageText: NSLocalizedString(@"Torrent download failed", "Torrent download error -> title")];
[alert setInformativeText: message];
[alert runModal];
[fPendingTorrentDownloads removeObjectForKey: [[download request] URL]];
if ([fPendingTorrentDownloads count] == 0)

View File

@ -36,10 +36,8 @@
+ (NSURL *) chooseFile;
- (void) updateLocationField;
- (void) createBlankAddressAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo;
- (void) createReal;
- (void) checkProgress;
- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info;
@end
@ -288,8 +286,17 @@ NSMutableSet *creatorWindowControllerSet = nil;
[alert addButtonWithTitle: NSLocalizedString(@"Cancel", "Create torrent -> blank address -> button")];
[alert setShowsSuppressionButton: YES];
[alert beginSheetModalForWindow: [self window] modalDelegate: self
didEndSelector: @selector(createBlankAddressAlertDidEnd:returnCode:contextInfo:) contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) {
if ([[alert suppressionButton] state] == NSOnState)
{
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningCreatorBlankAddress"]; //set regardless of private/public
if ([fPrivateCheck state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningCreatorPrivateBlankAddress"];
}
if (returnCode == NSAlertFirstButtonReturn)
[self performSelectorOnMainThread: @selector(createReal) withObject: nil waitUntilDone: NO];
}];
}
else
[self createReal];
@ -462,20 +469,6 @@ NSMutableSet *creatorWindowControllerSet = nil;
return success ? [panel URLs][0] : nil;
}
- (void) createBlankAddressAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo
{
if ([[alert suppressionButton] state] == NSOnState)
{
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningCreatorBlankAddress"]; //set regardless of private/public
if ([fPrivateCheck state] == NSOnState)
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningCreatorPrivateBlankAddress"];
}
if (returnCode == NSAlertFirstButtonReturn)
[self performSelectorOnMainThread: @selector(createReal) withObject: nil waitUntilDone: NO];
}
- (void) createReal
{
//check if the location currently exists
@ -492,7 +485,7 @@ NSMutableSet *creatorWindowControllerSet = nil;
[[fLocation URLByDeletingLastPathComponent] path]]];
[alert setAlertStyle: NSWarningAlertStyle];
[alert beginSheetModalForWindow: [self window] modalDelegate: self didEndSelector: nil contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:nil];
return;
}
@ -513,7 +506,7 @@ NSMutableSet *creatorWindowControllerSet = nil;
pathComponents[count-1], pathComponents[count-2]]];
[alert setAlertStyle: NSWarningAlertStyle];
[alert beginSheetModalForWindow: [self window] modalDelegate: self didEndSelector: nil contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:nil];
return;
}
@ -586,8 +579,10 @@ NSMutableSet *creatorWindowControllerSet = nil;
[alert setInformativeText: [NSString stringWithFormat: @"%@ (%d)",
NSLocalizedString(@"An unknown error has occurred.", "Create torrent -> failed -> warning"), fInfo->result]];
[alert beginSheetModalForWindow: [self window] modalDelegate: self
didEndSelector: @selector(failureSheetClosed:returnCode:contextInfo:) contextInfo: nil];
[alert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) {
[[alert window] orderOut: nil];
[[self window] close];
}];
}
}
else
@ -622,10 +617,4 @@ NSMutableSet *creatorWindowControllerSet = nil;
}
}
- (void) failureSheetClosed: (NSAlert *) alert returnCode: (NSInteger) code contextInfo: (void *) info
{
[[alert window] orderOut: nil];
[[self window] close];
}
@end

View File

@ -36,7 +36,7 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastItemNotificationKey;
SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
// -----------------------------------------------------------------------------
// SUUpdater Delegate:
// SUUpdater Delegate:
// -----------------------------------------------------------------------------
/*!

View File

@ -12,6 +12,10 @@
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
// there are name-space collisions) so we can list all of them to start with:
#pragma clang diagnostic push
// Do not use <> style includes since 2.x has two frameworks that need to work: Sparkle and SparkleCore
#pragma clang diagnostic ignored "-Wquoted-include-in-framework-header"
#import "SUAppcast.h"
#import "SUAppcastItem.h"
#import "SUStandardVersionComparator.h"
@ -30,4 +34,6 @@
#import "SPUURLRequest.h"
#import "SUCodeSigningVerifier.h"
#pragma clang diagnostic pop
#endif

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19E224g</string>
<string>20B28</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.23.0 34-g962878b84</string>
<string>1.24.0 a-67-g0e162c98</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,21 +25,23 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.23.0</string>
<string>1.24.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11B44</string>
<string>12C5020f</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<string>11.1</string>
<key>DTSDKBuild</key>
<string>19B68e</string>
<string>20C5048g</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<string>macosx11.1</string>
<key>DTXcode</key>
<string>1120</string>
<string>1230</string>
<key>DTXcodeBuild</key>
<string>11B44</string>
<string>12C5020f</string>
<key>LSBackgroundOnly</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>

View File

@ -10,7 +10,7 @@
</data>
<key>Resources/SUStatus.nib</key>
<data>
+3Tn7V2+cRw0Aw2VoWT1DNAPpkE=
ECVWRExfxyDt5uvKRD+70wc9J6s=
</data>
<key>Resources/ar.lproj/Sparkle.strings</key>
<dict>
@ -34,7 +34,7 @@
<dict>
<key>hash</key>
<data>
OjCfTDR+NbVLvirUPiJKJF6UiS0=
bY3rkqi/NJtXtjpK3FbV2o0gxbQ=
</data>
<key>optional</key>
<true/>
@ -70,7 +70,7 @@
<dict>
<key>hash</key>
<data>
i3TNbMzmKR52wTyfnD/bkZ12elE=
cHZov5FaqzfNhnBo0XdRuTMT4SY=
</data>
<key>optional</key>
<true/>
@ -115,7 +115,7 @@
<dict>
<key>hash</key>
<data>
vyI2nHyZlhhSXXrQGoflg8oB9Ig=
7LLOVs76ioMwEDV8Gah+6sV/5No=
</data>
<key>optional</key>
<true/>
@ -286,7 +286,7 @@
<dict>
<key>hash</key>
<data>
0vdFowZuJ1qLE3rDgG3BZ9SlNRw=
OnR96Z9tB0noODRSYssSs63+zGA=
</data>
<key>optional</key>
<true/>
@ -307,10 +307,10 @@
<dict>
<key>cdhash</key>
<data>
m93UAGlWG1VExsGEVOlzraeDVJU=
JwkAFJqL9xY1mTI+1Kki3oSFsik=
</data>
<key>requirement</key>
<string>cdhash H"034b541bc0ce637d7c6cbab430b6ae5bf60b18d2" or cdhash H"9bddd40069561b5544c6c18454e973ada7835495"</string>
<string>cdhash H"d5bc45cc18a448c02d5c4dd6859a64524a5b8a85" or cdhash H"270900149a8bf7163599323ed4a922de8485b229" or cdhash H"1b27242b81a5a51561703e2bb8a5e01acac436e9" or cdhash H"ead0c4c63eafc5d32327f0dbf958b7bd0993ec75"</string>
</dict>
<key>Resources/AppIcon.icns</key>
<dict>
@ -327,11 +327,11 @@
<dict>
<key>hash</key>
<data>
+3Tn7V2+cRw0Aw2VoWT1DNAPpkE=
ECVWRExfxyDt5uvKRD+70wc9J6s=
</data>
<key>hash2</key>
<data>
5qy5Hmt7D8O4gK4CkA7/lWikR3cX9ZSe6yTyluAeOh8=
AtY9YmPv7cUlbFWP2vCyVdi3/M+XQn98wOlrIES2Dgk=
</data>
</dict>
<key>Resources/ar.lproj/Sparkle.strings</key>
@ -364,11 +364,11 @@
<dict>
<key>hash</key>
<data>
OjCfTDR+NbVLvirUPiJKJF6UiS0=
bY3rkqi/NJtXtjpK3FbV2o0gxbQ=
</data>
<key>hash2</key>
<data>
06z1nY8VfM4M1SdHCc1jqewmP5Ue0g3mPDcNbeDVNIM=
RfJgT2b3STcLu71+1iU9ZcSXbfwMWG1EE1C7Wrf3xBk=
</data>
<key>optional</key>
<true/>
@ -416,11 +416,11 @@
<dict>
<key>hash</key>
<data>
i3TNbMzmKR52wTyfnD/bkZ12elE=
cHZov5FaqzfNhnBo0XdRuTMT4SY=
</data>
<key>hash2</key>
<data>
Xl/5yA/K9T7cscvPi/4/lWUtjJlIvO+esCF4SRaguz4=
39CdfZZ1CQQz1Gd1+Ukxo2JHl0XESoc/cqWKF091WUk=
</data>
<key>optional</key>
<true/>
@ -481,11 +481,11 @@
<dict>
<key>hash</key>
<data>
vyI2nHyZlhhSXXrQGoflg8oB9Ig=
7LLOVs76ioMwEDV8Gah+6sV/5No=
</data>
<key>hash2</key>
<data>
I1njQLVyH2bFsJecQOLDAB9N8q8niH7u+hqzxRqqerA=
TwklhrooHTXgV6Q9fbvvAB3mPIh7qDbEsNtUzo2fQuU=
</data>
<key>optional</key>
<true/>
@ -728,11 +728,11 @@
<dict>
<key>hash</key>
<data>
0vdFowZuJ1qLE3rDgG3BZ9SlNRw=
OnR96Z9tB0noODRSYssSs63+zGA=
</data>
<key>hash2</key>
<data>
ecJXF6vvj1f80iCr+Gk52cTyumQrea6H0NpOjwbbLiE=
zvMbFdgVGI0ls9vIRT+sie7dj2g1UjQu7iS+pOgyBo4=
</data>
<key>optional</key>
<true/>

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19E224g</string>
<string>20B28</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.23.0 35-gec1536277</string>
<string>1.24.0 a-67-g0e162c98</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,21 +25,23 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.23.0</string>
<string>1.24.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11B44</string>
<string>12C5020f</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<string>11.1</string>
<key>DTSDKBuild</key>
<string>19B68e</string>
<string>20C5048g</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<string>macosx11.1</string>
<key>DTXcode</key>
<string>1120</string>
<string>1230</string>
<key>DTXcodeBuild</key>
<string>11B44</string>
<string>12C5020f</string>
<key>LSMinimumSystemVersion</key>
<string>10.7</string>
</dict>

Some files were not shown because too many files have changed in this diff Show More