mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
Separate out UI bits from SUSparkleUserDriver delegate protocol
This commit is contained in:
1 parent
f5bc152f1c
commit
077b0c7bc9
4 files changed
+38
-12
No files matched your search
@@ -181,6 +181,7 @@
|
||||
725CB95B1C7121830064365A /* SUSparkleUserDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 725CB9591C7121830064365A /* SUSparkleUserDriver.m */; };
|
||||
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
|
||||
726DF88E1C84277600188804 /* SUStatusCompletionResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 726DF88D1C84277500188804 /* SUStatusCompletionResults.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
726E4A0E1C86881600C57C6A /* SUSparkleUserDriverUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 726E4A0D1C86881600C57C6A /* SUSparkleUserDriverUIDelegate.h */; };
|
||||
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */; };
|
||||
726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
|
||||
@@ -642,6 +643,7 @@
|
||||
7268AC641AD634E400C3E0C1 /* SUBinaryDeltaCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBinaryDeltaCreate.h; sourceTree = "<group>"; };
|
||||
726B2B5D1C645FC900388755 /* UI Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UI Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
726DF88D1C84277500188804 /* SUStatusCompletionResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUStatusCompletionResults.h; sourceTree = "<group>"; };
|
||||
726E4A0D1C86881600C57C6A /* SUSparkleUserDriverUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUSparkleUserDriverUIDelegate.h; sourceTree = "<group>"; };
|
||||
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUOperatingSystem.h; sourceTree = "<group>"; };
|
||||
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUOperatingSystem.m; sourceTree = "<group>"; };
|
||||
7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileManager.h; sourceTree = "<group>"; };
|
||||
@@ -998,6 +1000,7 @@
|
||||
children = (
|
||||
7246E0A11C83B685003B4E75 /* SUUpdaterController.h */,
|
||||
7246E0A21C83B685003B4E75 /* SUUpdaterController.m */,
|
||||
726E4A0D1C86881600C57C6A /* SUSparkleUserDriverUIDelegate.h */,
|
||||
725CB9581C7121830064365A /* SUSparkleUserDriver.h */,
|
||||
725CB9591C7121830064365A /* SUSparkleUserDriver.m */,
|
||||
6120721009CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.h */,
|
||||
@@ -1222,6 +1225,7 @@
|
||||
61B5F8ED09C4CE3C00B25A18 /* SUUpdater.h in Headers */,
|
||||
6158A1C5137904B300487EC1 /* SUUpdater_Private.h in Headers */,
|
||||
61A354550DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.h in Headers */,
|
||||
726E4A0E1C86881600C57C6A /* SUSparkleUserDriverUIDelegate.h in Headers */,
|
||||
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */,
|
||||
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */,
|
||||
);
|
||||
|
||||
Vendored
+2
-7
@@ -11,9 +11,9 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol SUVersionDisplay;
|
||||
@protocol SUSparkleUserDriverUIDelegate;
|
||||
|
||||
@protocol SUSparkleUserDriverDelegate <NSObject>
|
||||
@protocol SUSparkleUserDriverDelegate <NSObject, SUSparkleUserDriverUIDelegate>
|
||||
|
||||
@optional
|
||||
|
||||
@@ -22,11 +22,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (BOOL)responsibleForSignalingApplicationTerminationForUserDriver:(id <SUUserDriver>)userDriver;
|
||||
|
||||
- (void)userUpdaterDriverWillShowModalAlert:(id <SUUserDriver>)userDriver;
|
||||
- (void)userUpdaterDriverDidShowModalAlert:(id <SUUserDriver>)userDriver;
|
||||
|
||||
- (_Nullable id <SUVersionDisplay>)versionDisplayerForUserDriver:(id <SUUserDriver>)userDriver;
|
||||
|
||||
@end
|
||||
|
||||
@interface SUSparkleUserDriver : NSObject <SUUserDriver>
|
||||
|
||||
Vendored
+6
-5
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "SUSparkleUserDriver.h"
|
||||
#import "SUSparkleUserDriverUIDelegate.h"
|
||||
#import "SUAppcastItem.h"
|
||||
#import "SUVersionDisplayProtocol.h"
|
||||
#import "SUHost.h"
|
||||
@@ -347,10 +348,10 @@
|
||||
- (void)showAlert:(NSAlert *)alert
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
id <SUSparkleUserDriverDelegate> delegate = self.delegate;
|
||||
id <SUSparkleUserDriverUIDelegate> delegate = self.delegate;
|
||||
|
||||
if ([delegate respondsToSelector:@selector(userUpdaterDriverWillShowModalAlert:)]) {
|
||||
[delegate userUpdaterDriverWillShowModalAlert:self];
|
||||
if ([delegate respondsToSelector:@selector(userDriverWillShowModalAlert:)]) {
|
||||
[delegate userDriverWillShowModalAlert:self];
|
||||
}
|
||||
|
||||
// When showing a modal alert we need to ensure that background applications
|
||||
@@ -360,8 +361,8 @@
|
||||
[alert setIcon:[SUApplicationInfo bestIconForBundle:self.host.bundle]];
|
||||
[alert runModal];
|
||||
|
||||
if ([delegate respondsToSelector:@selector(userUpdaterDriverDidShowModalAlert:)]) {
|
||||
[delegate userUpdaterDriverDidShowModalAlert:self];
|
||||
if ([delegate respondsToSelector:@selector(userDriverDidShowModalAlert:)]) {
|
||||
[delegate userDriverDidShowModalAlert:self];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// SUSparkleUserDriverUIDelegate.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Mayur Pawashe on 3/1/16.
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol SUUserDriver, SUVersionDisplay;
|
||||
|
||||
@protocol SUSparkleUserDriverUIDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
- (void)userDriverWillShowModalAlert:(id <SUUserDriver>)userDriver;
|
||||
- (void)userDriverDidShowModalAlert:(id <SUUserDriver>)userDriver;
|
||||
|
||||
- (_Nullable id <SUVersionDisplay>)versionDisplayerForUserDriver:(id <SUUserDriver>)userDriver;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in new issue
Block a user