From 8175762e74aabd4e6c3c61b6cbb69e5f1e370a60 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 23 Jan 2011 12:47:21 +0100 Subject: [PATCH] Fixed auto update checks in Cocoa which were broken. --- cocoa/base/AppDelegate.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cocoa/base/AppDelegate.m b/cocoa/base/AppDelegate.m index ab309628..bf968c35 100644 --- a/cocoa/base/AppDelegate.m +++ b/cocoa/base/AppDelegate.m @@ -17,6 +17,13 @@ http://www.hardcoded.net/licenses/bsd_license @implementation AppDelegateBase - (void)awakeFromNib { + NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + /* Because the pref pane is lazily loaded, we have to manually do the update check if the + preference is set. + */ + if ([ud boolForKey:@"SUEnableAutomaticChecks"]) { + [[SUUpdater sharedUpdater] checkForUpdatesInBackground]; + } _recentResults = [[HSRecentFiles alloc] initWithName:@"recentResults" menu:recentResultsMenu]; [_recentResults setDelegate:self]; _resultWindow = [self createResultWindow];