using properties, removed unused code

This commit is contained in:
Michael Starke
2017-12-11 17:05:30 +01:00
parent e9131b65fd
commit 5e0d95cdc5
2 changed files with 17 additions and 16 deletions

View File

@@ -103,11 +103,11 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
MPDocument *document = self.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(_didAddEntry:) name:MPDocumentDidAddEntryNotification 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(_didRevertDocument:) name:MPDocumentDidRevertNotifiation 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(_didAddGroup:) name:MPDocumentDidAddGroupNotification object:document];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_didLockDatabase:) name:MPDocumentDidLockDatabaseNotification object:document];
[self.entryViewController registerNotificationsForDocument:document];
[self.inspectorViewController registerNotificationsForDocument:document];
@@ -444,7 +444,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
}
- (void)focusEntries:(id)sender {
[[self window] makeFirstResponder:[self.entryViewController reconmendedFirstResponder]];
[self.window makeFirstResponder:[self.entryViewController reconmendedFirstResponder]];
}
- (void)focusGroups:(id)sender {

View File

@@ -125,17 +125,18 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
self.entryTable.floatsGroupRows = NO;
[self.entryTable registerForDraggedTypes:@[KPKEntryUTI]];
/* First responder notifications */
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didBecomFirstResponder:)
name:MPDidActivateViewNotification
object:_entryTable];
/*
NSView *clipView = self.entryTable.enclosingScrollView.contentView;
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(_tableDidScroll:)
name:NSViewBoundsDidChangeNotification
object:clipView];
*/
selector:@selector(_didBecomFirstResponder:)
name:MPDidActivateViewNotification
object:_entryTable];
/*
NSView *clipView = self.entryTable.enclosingScrollView.contentView;
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(_tableDidScroll:)
name:NSViewBoundsDidChangeNotification
object:clipView];
*/
[self _setupEntryMenu];