mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
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
45 lines
1010 B
Objective-C
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
|