|
14 | 14 | @implementation PrefsWindowController |
15 | 15 |
|
16 | 16 | @synthesize okButton; |
17 | | -@synthesize saveOutput; |
18 | 17 | @synthesize disableVTQueries; |
19 | 18 | @synthesize showTrustedItems; |
20 | 19 | @synthesize disableUpdateCheck; |
@@ -50,40 +49,40 @@ -(void)windowDidLoad |
50 | 49 | if(YES == self.showTrustedItems) |
51 | 50 | { |
52 | 51 | //set |
53 | | - self.showTrustedItemsBtn.state = STATE_ENABLED; |
| 52 | + self.showTrustedItemsBtn.state = NSControlStateValueOn; |
54 | 53 | } |
55 | 54 |
|
56 | 55 | //TODO: add start at load |
57 | 56 |
|
| 57 | + //check if 'show trusted items' button should be selected |
| 58 | + if(YES == self.startAtLogin) |
| 59 | + { |
| 60 | + //set |
| 61 | + self.startAtLoginBtn.state = NSControlStateValueOn; |
| 62 | + } |
| 63 | + |
58 | 64 | //check if 'disable update check' button should be selected |
59 | 65 | if(YES == self.disableUpdateCheck) |
60 | 66 | { |
61 | 67 | //set |
62 | | - self.disableUpdateCheckBtn.state = STATE_ENABLED; |
| 68 | + self.disableUpdateCheckBtn.state = NSControlStateValueOn; |
63 | 69 | } |
64 | 70 |
|
65 | 71 | //check if 'disable vt queries' button should be selected |
66 | 72 | if(YES == self.disableVTQueries) |
67 | 73 | { |
68 | 74 | //set |
69 | | - self.disableVTQueriesBtn.state = STATE_ENABLED; |
70 | | - } |
71 | | - |
72 | | - //check if 'save output' button should be selected |
73 | | - if(YES == self.saveOutput) |
74 | | - { |
75 | | - //set |
76 | | - self.saveOutputBtn.state = STATE_ENABLED; |
| 75 | + self.disableVTQueriesBtn.state = NSControlStateValueOn; |
77 | 76 | } |
78 | 77 |
|
79 | 78 | //VT API key |
80 | 79 | if(0 != self.vtAPIKey.length) { |
81 | | - |
| 80 | + |
| 81 | + //set |
82 | 82 | self.apiTextField.stringValue = self.vtAPIKey; |
83 | 83 | } |
84 | 84 |
|
85 | | - |
86 | | - |
| 85 | + |
87 | 86 | return; |
88 | 87 | } |
89 | 88 |
|
@@ -173,18 +172,18 @@ -(void)savePrefs |
173 | 172 | //init |
174 | 173 | defaults = [NSUserDefaults standardUserDefaults]; |
175 | 174 |
|
176 | | - //save hiding OS components flag |
| 175 | + //grab 'include macOS/known items' |
177 | 176 | self.showTrustedItems = self.showTrustedItemsBtn.state; |
178 | 177 |
|
179 | | - //save current state of 'disable update checks' |
| 178 | + //grab 'start at login' state |
| 179 | + self.startAtLogin = self.startAtLoginBtn.state; |
| 180 | + |
| 181 | + //grab 'disable update checks' state |
180 | 182 | self.disableUpdateCheck = self.disableUpdateCheckBtn.state; |
181 | 183 |
|
182 | | - //save disabling VT flag |
| 184 | + //grab: disable VT state |
183 | 185 | self.disableVTQueries = self.disableVTQueriesBtn.state; |
184 | 186 |
|
185 | | - //save save output flag |
186 | | - self.saveOutput = self.saveOutputBtn.state; |
187 | | - |
188 | 187 | //grab API key |
189 | 188 | self.vtAPIKey = self.apiTextField.stringValue; |
190 | 189 |
|
|
0 commit comments