Added scrollview to inspector to accommodate bigger conntent

This commit is contained in:
michael starke
2013-06-16 14:13:19 +02:00
parent dadf416950
commit a39dc7ea68
11 changed files with 2286 additions and 1662 deletions

44
MacPass/MPLockDaemon.m Normal file
View File

@@ -0,0 +1,44 @@
//
// MPLockDaemon.m
// MacPass
//
// Created by Michael Starke on 16.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPLockDaemon.h"
NSString *const MPShouldLockDatabaseNotification = @"com.hicknhack.macpass.MPShouldLockDatabaseNotification";
@implementation MPLockDaemon
+ (MPLockDaemon *)sharedInstance {
static id sharedInstance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[MPLockDaemon alloc] init];
});
return sharedInstance;
}
- (id)init {
self = [super init];
if (self) {
NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
[notificationCenter addObserver:self selector:@selector(_willSleepNotification:) name:NSWorkspaceWillSleepNotification object:nil];
}
return self;
}
- (void)dealloc
{
[[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self];
[super dealloc];
}
- (void)_willSleepNotification:(NSNotification *)notification {
[[NSNotificationCenter defaultCenter] postNotificationName:MPShouldLockDatabaseNotification object:self];
}
@end