Refacoted window and view controller to use windowNibName and nibName. Fixes #164

This commit is contained in:
michael starke
2014-08-11 20:44:40 +02:00
parent 4cbb23bed5
commit 0ac4b6f440
23 changed files with 95 additions and 66 deletions

View File

@@ -18,6 +18,10 @@
@implementation MPIntegrationSettingsController
- (NSString *)nibName {
return @"IntegrationSettings";
}
- (NSString *)identifier {
return @"Integration";
}
@@ -30,11 +34,6 @@
return NSLocalizedString(@"INTEGRATION_SETTINGS", "");
}
- (id)init {
self = [super initWithNibName:@"IntegrationSettings" bundle:nil];
return self;
}
- (void)awakeFromNib {
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
NSString *serverKeyPath = [MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyEnableHttpServer];
@@ -46,7 +45,7 @@
[self.enableGlobalAutotypeCheckbutton bind:NSValueBinding toObject:defaultsController withKeyPath:globalAutotypeKeyPath options:nil];
[self.enableQuicklookCheckbutton bind:NSValueBinding toObject:defaultsController withKeyPath:quicklookKeyPath options:nil];
[self.globalAutotypeKeyData bind:NSValueBinding toObject:defaultsController withKeyPath:globalAutotypeDataKeyPath options:nil];
}
@end