SUUpdater now only gets created in release

This commit is contained in:
michael starke
2016-02-24 15:17:37 +01:00
parent 840559630c
commit dc57628c81
4 changed files with 28 additions and 16 deletions

View File

@@ -7,8 +7,11 @@
//
#import "MPUpdateSettingsController.h"
#import <Sparkle/Sparkle.h>
@interface MPUpdateSettingsController ()
@property (weak) IBOutlet NSButton *automaticallyCheckForUpdatesCheckButton;
@property (weak) IBOutlet NSPopUpButton *checkIntervallPopupButton;
@end
@@ -30,4 +33,16 @@
return NSLocalizedString(@"UPDATE_SETTINGS", @"Update Settings Label");
}
- (void)awakeFromNib {
#ifdef RELEASE
[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];
#else
self.checkIntervallPopupButton.enabled = NO;
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
#endif
}
@end