diff --git a/Sparkle/SPUStandardUserDriver.m b/Sparkle/SPUStandardUserDriver.m index 449b830b..37336923 100644 --- a/Sparkle/SPUStandardUserDriver.m +++ b/Sparkle/SPUStandardUserDriver.m @@ -24,6 +24,7 @@ @property (nonatomic, readonly) SUHost *host; @property (nonatomic, readonly) SPUUserDriverCoreComponent *coreComponent; +@property (nonatomic, weak, nullable, readonly) id delegate; @property (nonatomic) SUStatusController *checkingController; @property (nonatomic) SUUpdateAlert *activeUpdateAlert; @@ -48,7 +49,7 @@ if (self != nil) { _host = [[SUHost alloc] initWithBundle:hostBundle]; _delegate = delegate; - _coreComponent = [[SPUUserDriverCoreComponent alloc] initWithDelegate:delegate]; + _coreComponent = [[SPUUserDriverCoreComponent alloc] init]; } return self; } diff --git a/Sparkle/SPUStandardUserDriverProtocol.h b/Sparkle/SPUStandardUserDriverProtocol.h index 47e8f0ec..6b1a6e71 100644 --- a/Sparkle/SPUStandardUserDriverProtocol.h +++ b/Sparkle/SPUStandardUserDriverProtocol.h @@ -19,11 +19,6 @@ */ @protocol SPUStandardUserDriverProtocol -/*! - Readable and writable property for this user driver's delegate - */ -@property (nonatomic, weak, nullable, readonly) id delegate; - /*! Indicates whether or not an update is in progress as far as the user's perspective is concerned diff --git a/Sparkle/SPUUserDriverCoreComponent.h b/Sparkle/SPUUserDriverCoreComponent.h index 85e0a2e1..6f60e801 100644 --- a/Sparkle/SPUUserDriverCoreComponent.h +++ b/Sparkle/SPUUserDriverCoreComponent.h @@ -14,10 +14,6 @@ SU_EXPORT @interface SPUUserDriverCoreComponent : NSObject -- (instancetype)initWithDelegate:(id)delegate; - -@property (nonatomic, readonly, weak) id delegate; - - (void)showCanCheckForUpdates:(BOOL)canCheckForUpdates; @property (nonatomic, readonly) BOOL canCheckForUpdates; diff --git a/Sparkle/SPUUserDriverCoreComponent.m b/Sparkle/SPUUserDriverCoreComponent.m index 657bb4b8..8d31dfeb 100644 --- a/Sparkle/SPUUserDriverCoreComponent.m +++ b/Sparkle/SPUUserDriverCoreComponent.m @@ -7,7 +7,6 @@ // #import "SPUUserDriverCoreComponent.h" -#import "SPUStandardUserDriverDelegate.h" #ifdef _APPKITDEFINES_H #error This is a "core" class and should NOT import AppKit @@ -26,24 +25,12 @@ @implementation SPUUserDriverCoreComponent -@synthesize delegate = _delegate; @synthesize canCheckForUpdates = _canCheckForUpdates; @synthesize installUpdateHandler = _installUpdateHandler; @synthesize updateCheckStatusCompletion = _updateCheckStatusCompletion; @synthesize downloadStatusCompletion = _downloadStatusCompletion; @synthesize acknowledgement = _acknowledgement; -#pragma mark Birth - -- (instancetype)initWithDelegate:(id)delegate -{ - self = [super init]; - if (self != nil) { - _delegate = delegate; - } - return self; -} - #pragma mark Is Update Busy? - (void)showCanCheckForUpdates:(BOOL)canCheckForUpdates diff --git a/TestApplication/SUPopUpTitlebarUserDriver.h b/TestApplication/SUPopUpTitlebarUserDriver.h index 30d6cac0..88728661 100644 --- a/TestApplication/SUPopUpTitlebarUserDriver.h +++ b/TestApplication/SUPopUpTitlebarUserDriver.h @@ -13,6 +13,6 @@ @interface SUPopUpTitlebarUserDriver : NSObject -- (instancetype)initWithHostBundle:(NSBundle *)hostBundle window:(NSWindow *)window delegate:(id)delegate; +- (instancetype)initWithHostBundle:(NSBundle *)hostBundle window:(NSWindow *)window; @end diff --git a/TestApplication/SUPopUpTitlebarUserDriver.m b/TestApplication/SUPopUpTitlebarUserDriver.m index 5f16f842..46838595 100644 --- a/TestApplication/SUPopUpTitlebarUserDriver.m +++ b/TestApplication/SUPopUpTitlebarUserDriver.m @@ -28,7 +28,6 @@ @implementation SUPopUpTitlebarUserDriver -@synthesize delegate = _delegate; @synthesize hostBundle = _hostBundle; @synthesize window = _window; @synthesize coreComponent = _coreComponent; @@ -39,14 +38,13 @@ @synthesize expectedContentLength = _expectedContentLength; @synthesize contentLengthDownloaded = _contentLengthDownloaded; -- (instancetype)initWithHostBundle:(NSBundle *)hostBundle window:(NSWindow *)window delegate:(id)delegate +- (instancetype)initWithHostBundle:(NSBundle *)hostBundle window:(NSWindow *)window { self = [super init]; if (self != nil) { _hostBundle = hostBundle; _window = window; - _delegate = delegate; - _coreComponent = [[SPUUserDriverCoreComponent alloc] initWithDelegate:delegate]; + _coreComponent = [[SPUUserDriverCoreComponent alloc] init]; } return self; } diff --git a/TestApplication/SUUpdateSettingsWindowController.m b/TestApplication/SUUpdateSettingsWindowController.m index d0d8c35d..033b063d 100644 --- a/TestApplication/SUUpdateSettingsWindowController.m +++ b/TestApplication/SUUpdateSettingsWindowController.m @@ -34,7 +34,7 @@ // If the user is holding down command, we use the popup title user driver instead id userDriver; if (([NSEvent modifierFlags] & NSCommandKeyMask) != 0) { - userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithHostBundle:hostBundle window:self.window delegate:nil]; + userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithHostBundle:hostBundle window:self.window]; } else { userDriver = [[SPUStandardUserDriver alloc] initWithHostBundle:hostBundle delegate:nil]; }