Using new KeePassKit API, simple multi selection support

This commit is contained in:
michael starke
2016-02-25 18:41:50 +01:00
parent 06c5f4d740
commit eb6e6bcaa9
22 changed files with 213 additions and 247 deletions

View File

@@ -17,6 +17,18 @@
@implementation MPOutlineView
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)viewDidMoveToSuperview {
[[NSNotificationCenter defaultCenter] removeObserver:self];
if(self.enclosingScrollView) {
[self _setupNotifications];
}
}
- (void)mouseDown:(NSEvent *)theEvent {
[super mouseDown:theEvent];
if(_didBecomeFirstResponder) {
@@ -36,4 +48,15 @@
return [super resignFirstResponder];
}
- (void)_setupNotifications {
[[NSNotificationCenter defaultCenter] removeObserver:self];
if(self.enclosingScrollView.contentView) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeFrame:) name:NSViewBoundsDidChangeNotification object:self.enclosingScrollView.contentView];
}
}
- (void)_didChangeFrame:(NSNotification *)notification {
NSLog(@"DidChangeFrame:%@", NSStringFromRect(self.bounds));
}
@end