Files
MacPass/MacPass/MPIntegrationSettingsController.m
2014-03-17 18:51:03 +01:00

47 lines
1.4 KiB
Objective-C

//
// MPServerSettingsController.m
// MacPass
//
// Created by Michael Starke on 17.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPIntegrationSettingsController.h"
#import "MPSettingsHelper.h"
#import "MPIconHelper.h"
@interface MPIntegrationSettingsController ()
@end
@implementation MPIntegrationSettingsController
- (NSString *)identifier {
return @"Integration";
}
- (NSImage *)image {
return [NSImage imageNamed:NSImageNameComputer];
}
- (NSString *)label {
return NSLocalizedString(@"INTEGRATION_SETTINGS", "");
}
- (id)init {
self = [super initWithNibName:@"IntegrationSettings" bundle:nil];
return self;
}
- (void)didLoadView {
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
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];
[self.enableGlobalAutotypeCheckbutton setEnabled:NO];
}
@end