From 404fdad555920dde42c6e31c67a03e4dbabf7531 Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Sat, 12 Feb 2011 09:01:32 -0600 Subject: [PATCH] Releaseses the start items when you logout so it'll force a update and added a update 5 minutes after it starts everything to help improve the probability of it updating the database before your computer crashes and to prevent some applications from launching twice. --- Classes/MGMController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/MGMController.m b/Classes/MGMController.m index c17acb7..20eb22d 100644 --- a/Classes/MGMController.m +++ b/Classes/MGMController.m @@ -321,8 +321,10 @@ OSStatus frontAppChanged(EventHandlerCallRef nextHandler, EventRef theEvent, voi #endif } - if (itemIndex>=[startItems count]) + if (itemIndex>=[startItems count]) { [self releaseStartItems]; + [self performSelector:@selector(updateItems) withObject:nil afterDelay:300]; + } } - (void)startItem:(NSTimer *)timer { NSDictionary *info = [timer userInfo]; @@ -667,6 +669,7 @@ OSStatus frontAppChanged(EventHandlerCallRef nextHandler, EventRef theEvent, voi - (void)willLogout:(NSNotification *)theNotification { if (mainWindow!=nil) [self releaseMainWindow]; + [self releaseStartItems]; [self updateItems]; } - (void)updaterWillRelaunchApplication {