mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
using properties, removed unused code
This commit is contained in:
@@ -103,11 +103,11 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
|||||||
|
|
||||||
MPDocument *document = self.document;
|
MPDocument *document = self.document;
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didRevertDocument:) name:MPDocumentDidRevertNotifiation object:document];
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didRevertDocument:) name:MPDocumentDidRevertNotifiation object:document];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didUnlockDatabase:) name:MPDocumentDidUnlockDatabaseNotification object:document];
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didUnlockDatabase:) name:MPDocumentDidUnlockDatabaseNotification object:document];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didAddEntry:) name:MPDocumentDidAddEntryNotification object:document];
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didAddEntry:) name:MPDocumentDidAddEntryNotification object:document];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didAddGroup:) name:MPDocumentDidAddGroupNotification object:document];
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didAddGroup:) name:MPDocumentDidAddGroupNotification object:document];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didLockDatabase:) name:MPDocumentDidLockDatabaseNotification object:document];
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didLockDatabase:) name:MPDocumentDidLockDatabaseNotification object:document];
|
||||||
|
|
||||||
[self.entryViewController registerNotificationsForDocument:document];
|
[self.entryViewController registerNotificationsForDocument:document];
|
||||||
[self.inspectorViewController registerNotificationsForDocument:document];
|
[self.inspectorViewController registerNotificationsForDocument:document];
|
||||||
@@ -444,7 +444,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusEntries:(id)sender {
|
- (void)focusEntries:(id)sender {
|
||||||
[[self window] makeFirstResponder:[self.entryViewController reconmendedFirstResponder]];
|
[self.window makeFirstResponder:[self.entryViewController reconmendedFirstResponder]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusGroups:(id)sender {
|
- (void)focusGroups:(id)sender {
|
||||||
|
|||||||
@@ -125,10 +125,11 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
self.entryTable.floatsGroupRows = NO;
|
self.entryTable.floatsGroupRows = NO;
|
||||||
[self.entryTable registerForDraggedTypes:@[KPKEntryUTI]];
|
[self.entryTable registerForDraggedTypes:@[KPKEntryUTI]];
|
||||||
/* First responder notifications */
|
/* First responder notifications */
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[NSNotificationCenter.defaultCenter addObserver:self
|
||||||
selector:@selector(_didBecomFirstResponder:)
|
selector:@selector(_didBecomFirstResponder:)
|
||||||
name:MPDidActivateViewNotification
|
name:MPDidActivateViewNotification
|
||||||
object:_entryTable];
|
object:_entryTable];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NSView *clipView = self.entryTable.enclosingScrollView.contentView;
|
NSView *clipView = self.entryTable.enclosingScrollView.contentView;
|
||||||
[NSNotificationCenter.defaultCenter addObserver:self
|
[NSNotificationCenter.defaultCenter addObserver:self
|
||||||
|
|||||||
Reference in New Issue
Block a user