From 8edbc0684950c51fef8074444359019553b7fc5b Mon Sep 17 00:00:00 2001 From: michael starke Date: Fri, 23 Oct 2015 19:29:35 +0200 Subject: [PATCH] using properties Signed-off-by: michael starke --- MacPass/MPLockDaemon.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MacPass/MPLockDaemon.m b/MacPass/MPLockDaemon.m index b09dcc9e..164af68b 100644 --- a/MacPass/MPLockDaemon.m +++ b/MacPass/MPLockDaemon.m @@ -76,7 +76,7 @@ } - (void)_willSleepNotification:(NSNotification *)notification { - [(MPAppDelegate *)[NSApp delegate] lockAllDocuments]; + [((MPAppDelegate *)NSApp.delegate) lockAllDocuments]; } - (void)_checkIdleTime:(NSTimer *)timer { @@ -85,7 +85,7 @@ } NSTimeInterval currentInterval = ([NSDate timeIntervalSinceReferenceDate] - self.lastLocalEventTime); if(self.idleLockTime < currentInterval) { - [(MPAppDelegate *)[NSApp delegate] lockAllDocuments]; + [((MPAppDelegate *)NSApp.delegate) lockAllDocuments]; /* Reset the timer to full interval */ [self.idleCheckTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:_idleLockTime]]; }