File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,23 @@ - (void)runDelayedUIActionsAfterLaunch {
137137 [notationController checkIfNotationIsTrashed ];
138138
139139 // connect sparkle programmatically to avoid loading its framework at nib awake;
140+
140141 if (!NSClassFromString (@" SUUpdater" )) {
141142 NSString *frameworkPath = [[[NSBundle bundleForClass: [self class ]] privateFrameworksPath ] stringByAppendingPathComponent: @" Sparkle.framework" ];
142143 if ([[NSBundle bundleWithPath: frameworkPath] load ]) {
143- [sparkleUpdateItem setTarget: [[NSClassFromString (@" SUUpdater" ) alloc ] init ]];
144+ id updater = [NSClassFromString (@" SUUpdater" ) performSelector: @selector (sharedUpdater )];
145+ [sparkleUpdateItem setTarget: updater];
144146 [sparkleUpdateItem setAction: @selector (checkForUpdates: )];
147+ if (![[prefsController notationPrefs ] firstTimeUsed ]) {
148+ // don't do anything automatically on the first launch; afterwards, check every 4 days, as specified in Info.plist
149+ SEL checksSEL = @selector (setAutomaticallyChecksForUpdates: );
150+ [updater methodForSelector: checksSEL](updater, checksSEL, YES );
151+ }
145152 } else {
146153 NSLog (@" Could not load %@ !" , frameworkPath);
147154 }
148155 }
149-
156+
150157 [NSApp setServicesProvider: self ];
151158}
152159
Original file line number Diff line number Diff line change 199199 </array >
200200 <key >SUCheckAtStartup </key >
201201 <false />
202+ <key >SUScheduledCheckInterval </key >
203+ <real >345600 </real >
202204 <key >SUFeedURL </key >
203205 <string >http://notational.net/nvupdates.xml </string >
204206 <key >SmartCrashReports_CompanyName </key >
You can’t perform that action at this time.
0 commit comments