updated to Sparkle 2

This commit is contained in:
Michael Starke
2022-11-17 20:36:33 +01:00
parent bc833640e4
commit 45e2402e5f
4 changed files with 21 additions and 11 deletions

View File

@@ -21,6 +21,10 @@
//
#import "MPUpdatePreferencesController.h"
#import "MPAppDelegate.h"
#import "NSApplication+MPAdditions.h"
#import <Sparkle/Sparkle.h>
@interface MPUpdatePreferencesController ()
@@ -53,9 +57,10 @@
self.checkIntervallPopupButton.enabled = NO;
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
#else
[self.checkIntervallPopupButton bind:NSSelectedTagBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(updateCheckInterval)) options:nil];
[self.checkIntervallPopupButton bind:NSEnabledBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
[self.automaticallyCheckForUpdatesCheckButton bind:NSValueBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
SPUUpdater *updater = NSApplication.sharedApplication.mp_delegate.updater;
[self.checkIntervallPopupButton bind:NSSelectedTagBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(updateCheckInterval)) options:nil];
[self.checkIntervallPopupButton bind:NSEnabledBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
[self.automaticallyCheckForUpdatesCheckButton bind:NSValueBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
#endif
}