Autotype settings are now correctly bound to the defaults

This commit is contained in:
michael starke
2014-02-19 19:44:14 +01:00
parent 84cd196d54
commit 24d0c3a6ee
3 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPIntegrationSettingsController">
<connections>
<outlet property="enableGlobalAutotypeCheckbutton" destination="tik-Ar-FJg" id="d2f-69-2BP"/>
<outlet property="enableServerCheckbutton" destination="2" id="17"/>
<outlet property="view" destination="1" id="18"/>
</connections>

View File

@@ -12,5 +12,6 @@
@interface MPIntegrationSettingsController : MPViewController <MPSettingsTab>
@property (weak) IBOutlet NSButton *enableServerCheckbutton;
@property (weak) IBOutlet NSButton *enableGlobalAutotypeCheckbutton;
@end

View File

@@ -35,9 +35,11 @@
- (void)didLoadView {
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
NSString *serverKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyEnableHttpServer];
NSString *serverKeyPath = [MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyEnableHttpServer];
NSString *globalAutotypeKeyPath = [MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyEnableGlobalAutotype];
[self.enableServerCheckbutton bind:NSValueBinding toObject:defaultsController withKeyPath:serverKeyPath options:nil];
[self.enableServerCheckbutton setEnabled:NO];
[self.enableGlobalAutotypeCheckbutton bind:NSValueBinding toObject:defaultsController withKeyPath:globalAutotypeKeyPath options:nil];
}
@end