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

@@ -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