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.

This commit is contained in:
GRMrGecko 2011-02-12 09:01:32 -06:00
parent 89c1462a05
commit 404fdad555

View File

@ -321,8 +321,10 @@ OSStatus frontAppChanged(EventHandlerCallRef nextHandler, EventRef theEvent, voi
#endif #endif
} }
if (itemIndex>=[startItems count]) if (itemIndex>=[startItems count]) {
[self releaseStartItems]; [self releaseStartItems];
[self performSelector:@selector(updateItems) withObject:nil afterDelay:300];
}
} }
- (void)startItem:(NSTimer *)timer { - (void)startItem:(NSTimer *)timer {
NSDictionary *info = [timer userInfo]; NSDictionary *info = [timer userInfo];
@ -667,6 +669,7 @@ OSStatus frontAppChanged(EventHandlerCallRef nextHandler, EventRef theEvent, voi
- (void)willLogout:(NSNotification *)theNotification { - (void)willLogout:(NSNotification *)theNotification {
if (mainWindow!=nil) [self releaseMainWindow]; if (mainWindow!=nil) [self releaseMainWindow];
[self releaseStartItems];
[self updateItems]; [self updateItems];
} }
- (void)updaterWillRelaunchApplication { - (void)updaterWillRelaunchApplication {