mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 03:32:40 +00:00
40 lines
845 B
Objective-C
40 lines
845 B
Objective-C
//
|
|
// MPOutlineView.m
|
|
// MacPass
|
|
//
|
|
// Created by Michael Starke on 23.07.13.
|
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
//
|
|
|
|
#import "MPOutlineView.h"
|
|
#import "MPNotifications.h"
|
|
|
|
@interface MPOutlineView () {
|
|
BOOL _didBecomeFirstResponder;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation MPOutlineView
|
|
|
|
- (void)mouseDown:(NSEvent *)theEvent {
|
|
[super mouseDown:theEvent];
|
|
if(_didBecomeFirstResponder) {
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDidActivateViewNotification
|
|
object:self
|
|
userInfo:nil];
|
|
}
|
|
_didBecomeFirstResponder = NO;
|
|
}
|
|
|
|
- (BOOL)becomeFirstResponder {
|
|
_didBecomeFirstResponder = YES;
|
|
return YES;
|
|
}
|
|
|
|
- (BOOL)resignFirstResponder {
|
|
return [super resignFirstResponder];
|
|
}
|
|
|
|
@end
|