diff --git a/Sparkle/SUAppcastItem.h b/Sparkle/SUAppcastItem.h index 453dd669..c859a10e 100644 --- a/Sparkle/SUAppcastItem.h +++ b/Sparkle/SUAppcastItem.h @@ -21,7 +21,7 @@ @property (copy, readonly) NSString *versionString; @property (copy, readonly) NSString *displayVersionString; @property (copy, readonly) NSDictionary *deltaUpdates; -@property (strong, readonly) NSURL *infoURL; // UK 2007-08-31 +@property (strong, readonly) NSURL *infoURL; // Initializes with data from a dictionary provided by the RSS class. - (instancetype)initWithDictionary:(NSDictionary *)dict; @@ -33,7 +33,7 @@ // Returns the dictionary provided in initWithDictionary; this might be useful later for extensions. @property (readonly, copy) NSDictionary *propertiesDictionary; -- (NSURL *)infoURL; // UK 2007-08-31 +- (NSURL *)infoURL; @end diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 6bf02f08..16c26fd9 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -77,7 +77,7 @@ // Feel free to change the separator string to a hyphen or something more suited to your needs if you like. NSString *newVersion = enclosure[@"sparkle:version"]; if( newVersion == nil ) - newVersion = dict[@"sparkle:version"]; // UK 2007-08-31 Get version from the item, in case it's a download-less item (i.e. paid upgrade). + newVersion = dict[@"sparkle:version"]; // Get version from the item, in case it's a download-less item (i.e. paid upgrade). if (newVersion == nil) // no sparkle:version attribute anywhere? { // Separate the url by underscores and take the last component, as that'll be closest to the end, diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 5498d81c..b79e5d7e 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -34,7 +34,7 @@ @property (weak) IBOutlet WebView *releaseNotesView; @property (weak) IBOutlet NSTextField *descriptionField; -@property (weak) IBOutlet NSButton *installButton; // UK 2007-08-31. +@property (weak) IBOutlet NSButton *installButton; @property (weak) IBOutlet NSButton *skipButton; @property (weak) IBOutlet NSButton *laterButton; @@ -154,7 +154,7 @@ NSNumber *shouldShowReleaseNotes = [self.host objectForInfoDictionaryKey:SUShowReleaseNotesKey]; if (shouldShowReleaseNotes == nil) { - // UK 2007-09-18: Don't show release notes if RSS item contains no description and no release notes URL: + // Don't show release notes if RSS item contains no description and no release notes URL: return( ([self.updateItem itemDescription] != nil && [[[self.updateItem itemDescription] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]] length] > 0) || [self.updateItem releaseNotesURL] != nil ); @@ -169,7 +169,7 @@ if( [self.host objectForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey] ) allowAutoUpdates = [self.host boolForInfoDictionaryKey: SUAllowsAutomaticUpdatesKey]; - // UK 2007-08-31: Give delegate a chance to modify this choice: + // Give delegate a chance to modify this choice: if (self.delegate && [self.delegate respondsToSelector: @selector(updateAlert:shouldAllowAutoUpdate:)] ) [self.delegate updateAlert: self shouldAllowAutoUpdate: &allowAutoUpdates]; @@ -187,9 +187,8 @@ // We're gonna do some frame magic to match the window's size to the description field and the presence of the release notes view. NSRect frame = [[self window] frame]; - BOOL showReleaseNotes = [self showsReleaseNotes]; // UK 2007-09-18 - if (!showReleaseNotes) // UK 2007-09-18 - { + BOOL showReleaseNotes = [self showsReleaseNotes]; + if (!showReleaseNotes) { // Resize the window to be appropriate for not having a huge release notes view. frame.size.height -= [self.releaseNotesView frame].size.height + 40; // Extra 40 is for the release notes label and margin. @@ -212,8 +211,7 @@ [[[self.releaseNotesView superview] superview] setFrame:boxFrame]; } - if( [self.updateItem fileURL] == nil ) // UK 2007-08-31 (whole if clause) - { + if( [self.updateItem fileURL] == nil ) { [self.installButton setTitle: SULocalizedString( @"Learn More...", @"Alternate title for 'Install Update' button when there's no download in RSS feed." )]; [self.installButton setAction: @selector(openInfoURL:)]; } @@ -247,10 +245,8 @@ [self.skipButton setFrame: skipBtnBox]; minimumWindowWidth += DISTANCE_BETWEEN_BUTTON_GROUPS +titleSize.width; - if( showReleaseNotes ) // UK 2007-09-18 (whole block) - { - if( sizeStr ) - { + if( showReleaseNotes ) { + if( sizeStr ) { NSSize desiredSize = NSSizeFromString( sizeStr ); NSSize sizeDiff = NSZeroSize; // NSBox* boxView = (NSBox*)[[releaseNotesView superview] superview]; @@ -277,12 +273,11 @@ [[self window] setFrame: frame display: NO]; [[self window] center]; - if (showReleaseNotes) // UK 2007-09-18 - { + if (showReleaseNotes) { [self displayReleaseNotes]; } - [[[self.releaseNotesView superview] superview] setHidden: !showReleaseNotes]; // UK 2007-09-18 + [[[self.releaseNotesView superview] superview] setHidden: !showReleaseNotes]; } diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index aa7c0432..88952356 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -220,7 +220,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault if (self.checkTimer) { [self.checkTimer invalidate]; - self.checkTimer = nil; // UK 2009-03-16 Timer is non-repeating, may have invalidated itself, so we had to retain it. + self.checkTimer = nil; // Timer is non-repeating, may have invalidated itself, so we had to retain it. } if (![self automaticallyChecksForUpdates]) return; @@ -237,7 +237,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault delayUntilCheck = (updateCheckInterval - intervalSinceCheck); // It hasn't been long enough. else delayUntilCheck = 0; // We're overdue! Run one now. - self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // UK 2009-03-16 Timer is non-repeating, may have invalidated itself, so we had to retain it. + self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // Timer is non-repeating, may have invalidated itself, so we had to retain it. } @@ -334,7 +334,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault - (void)checkForUpdatesWithDriver:(SUUpdateDriver *)d { if ([self updateInProgress]) { return; } - if (self.checkTimer) { [self.checkTimer invalidate]; self.checkTimer = nil; } // UK 2009-03-16 Timer is non-repeating, may have invalidated itself, so we had to retain it. + if (self.checkTimer) { [self.checkTimer invalidate]; self.checkTimer = nil; } // Timer is non-repeating, may have invalidated itself, so we had to retain it. SUClearLog(); SULog( @"===== %@ =====", [[NSFileManager defaultManager] displayNameAtPath: [[NSBundle mainBundle] bundlePath]] ); @@ -561,7 +561,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault - (void)dealloc { [self unregisterAsObserver]; - if (checkTimer) { [checkTimer invalidate]; } // UK 2009-03-16 Timer is non-repeating, may have invalidated itself, so we had to retain it. + if (checkTimer) { [checkTimer invalidate]; } // Timer is non-repeating, may have invalidated itself, so we had to retain it. } - (BOOL)validateMenuItem:(NSMenuItem *)item