Files
MacPass/MacPass/MPTableView.m
michael starke 07dae46b4c Fixed #39 Overall search behavior ironed out.
Fixed #71 Added A simple entropy calculation for purely random generated passwords
Added separate Views for Group and Entry Inspector
Added "no Selection" view for Inpsector
2013-07-28 13:31:37 +02:00

45 lines
1010 B
Objective-C

//
// MPTableView.m
// MacPass
//
// Created by Michael Starke on 07.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPTableView.h"
#import "MPNotifications.h"
@interface MPTableView () {
BOOL _didBecomeFirstResponder;
}
@end
@implementation MPTableView
- (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;
}
- (void)drawBackgroundInClipRect:(NSRect)clipRect {
/*
We need to clear the outer areas
as calling super will not do that for us
*/
[[self backgroundColor] set];
NSRectFill(clipRect);
[super drawBackgroundInClipRect:clipRect];
}
@end