mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 17:32:17 +00:00
using properties
Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)_willSleepNotification:(NSNotification *)notification {
|
- (void)_willSleepNotification:(NSNotification *)notification {
|
||||||
[(MPAppDelegate *)[NSApp delegate] lockAllDocuments];
|
[((MPAppDelegate *)NSApp.delegate) lockAllDocuments];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_checkIdleTime:(NSTimer *)timer {
|
- (void)_checkIdleTime:(NSTimer *)timer {
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
NSTimeInterval currentInterval = ([NSDate timeIntervalSinceReferenceDate] - self.lastLocalEventTime);
|
NSTimeInterval currentInterval = ([NSDate timeIntervalSinceReferenceDate] - self.lastLocalEventTime);
|
||||||
if(self.idleLockTime < currentInterval) {
|
if(self.idleLockTime < currentInterval) {
|
||||||
[(MPAppDelegate *)[NSApp delegate] lockAllDocuments];
|
[((MPAppDelegate *)NSApp.delegate) lockAllDocuments];
|
||||||
/* Reset the timer to full interval */
|
/* Reset the timer to full interval */
|
||||||
[self.idleCheckTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:_idleLockTime]];
|
[self.idleCheckTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:_idleLockTime]];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user