-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMultiPatchController.m
37 lines (31 loc) · 1.24 KB
/
MultiPatchController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// MultiPatchController.m
// MultiPatcher
//
// Created by Paul Kratt on 12/1/18.
//
#import "MultiPatchController.h"
#import "MPSettings.h"
#import <Sparkle/Sparkle.h>
@implementation MultiPatchController
-(void)applicationDidFinishLaunching:(NSNotification *)notification{
//Hard-coded to off at startup, to force the user to realize that the output will probably be invalid.
//Desired workflow:
//User tries patching, program notifies them that their input file is wrong.
//User goes into preferences and disables the check and applies patch again.
//User gets a file that might work, but might not, since their input was wrong.
MPSettings.IgnoreXDeltaChecksum = NO;
}
- (IBAction)showPreferences:(id)sender {
SUUpdater* sparkle = [SUUpdater sharedUpdater];
_chkCheckForUpdates.state = sparkle.automaticallyChecksForUpdates ? NSOnState : NSOffState;
[_wndPreferences makeKeyAndOrderFront:self];
}
- (IBAction)chkCheckForUpdates_Changed:(id)sender {
SUUpdater* sparkle = [SUUpdater sharedUpdater];
sparkle.automaticallyChecksForUpdates = (_chkCheckForUpdates.state == NSOnState);
}
- (IBAction)chkIgnoreXdelta_Changed:(id)sender {
MPSettings.IgnoreXDeltaChecksum = (_chkIgnoreXDelta.state==NSOnState);
}
@end