mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Using (class) properties
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
- (void)registerNotificationsForDocument:(MPDocument *)document {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(_didAddGroup:)
|
||||
name:MPDocumentDidAddGroupNotification
|
||||
object:document];
|
||||
@@ -129,8 +129,8 @@
|
||||
options:nil];
|
||||
}
|
||||
- (IBAction)toggleExpire:(NSButton*)sender {
|
||||
KPKGroup *group = [self representedObject];
|
||||
if([sender state] == NSOnState && [group.timeInfo.expirationDate isEqualToDate:[NSDate distantFuture]]) {
|
||||
KPKGroup *group = self.representedObject;
|
||||
if(sender.state == NSOnState && [group.timeInfo.expirationDate isEqualToDate:NSDate.distantFuture]) {
|
||||
[NSApp sendAction:self.expireDateSelectButton.action to:nil from:self.expireDateSelectButton];
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,8 @@
|
||||
- (void)_didAddGroup:(NSNotification *)notification {
|
||||
if(!self.titleTextField.window) {
|
||||
self.focusTitleOnceViewAppears = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
[self.titleTextField becomeFirstResponder];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
|
||||
- (void)awakeFromNib {
|
||||
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
||||
NSUserDefaultsController *defaultsController = NSUserDefaultsController.sharedUserDefaultsController;
|
||||
NSString *enableGlobalAutotypeKeyPath = [MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyEnableGlobalAutotype];
|
||||
NSString *quicklookKeyPath = [MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyEnableQuicklookPreview];
|
||||
[self.enableGlobalAutotypeCheckBox bind:NSValueBinding toObject:defaultsController withKeyPath:enableGlobalAutotypeKeyPath options:nil];
|
||||
|
||||
Reference in New Issue
Block a user