Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/andymatuschak/Sparkle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean McBride authored and Sean McBride committed Dec 30, 2009
2 parents b90df8b + b96c950 commit 61291c7
Show file tree
Hide file tree
Showing 28 changed files with 2,772 additions and 167 deletions.
2 changes: 1 addition & 1 deletion SUAppcast.m
Expand Up @@ -229,7 +229,7 @@ - (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes
while ((node = [nodeEnum nextObject]))
{
lang = [[node attributeForName:@"xml:lang"] stringValue];
[languages addObject:(lang ?: @"")];
[languages addObject:(lang ? lang : @"")];
}
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
Expand Down
5 changes: 3 additions & 2 deletions SUBasicUpdateDriver.m
Expand Up @@ -143,7 +143,7 @@ - (void)download:(NSURLDownload *)d decideDestinationWithSuggestedFilename:(NSSt
if (tempDir)
{
tempDir = [tempDir stringByAppendingPathComponent:prefix];
unsigned int cnt=1;
unsigned int cnt = 1;
while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999)
{
tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %u", prefix, cnt++]];
Expand Down Expand Up @@ -288,7 +288,8 @@ - (void)relaunchHostApp
if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)])
pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater];
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];


[self setValue:[NSNumber numberWithBool:YES] forKey:@"finished"];
[NSApp terminate:self];
}

Expand Down
2 changes: 1 addition & 1 deletion SUHost.m
Expand Up @@ -191,7 +191,7 @@ - (void)setBool:(BOOL)value forUserDefaultsKey:(NSString *)defaultName
}

- (id)objectForKey:(NSString *)key {
return [self objectForUserDefaultsKey:key] ?: [self objectForInfoDictionaryKey:key];
return [self objectForUserDefaultsKey:key] ? [self objectForUserDefaultsKey:key] : [self objectForInfoDictionaryKey:key];
}

- (BOOL)boolForKey:(NSString *)key {
Expand Down
3 changes: 2 additions & 1 deletion SUUpdater.m
Expand Up @@ -313,7 +313,8 @@ - (NSString *)userAgentString
if (customUserAgentString)
return customUserAgentString;

NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil];
NSString *version = [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"];
NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], version ? version : @"?"];
NSData *cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
return [[[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding] autorelease];
}
Expand Down
9 changes: 9 additions & 0 deletions Sparkle.xcodeproj/project.pbxproj
Expand Up @@ -211,6 +211,10 @@
615409C6103BBD9F00125AF1 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/SUAutomaticUpdateAlert.nib; sourceTree = "<group>"; };
615409C7103BBDA600125AF1 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/SUUpdateAlert.nib; sourceTree = "<group>"; };
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SUModelTranslation.plist; sourceTree = "<group>"; };
6186554210D7484300B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUUpdatePermissionPrompt.nib; sourceTree = "<group>"; };
6186554310D7484E00B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Sparkle.strings; sourceTree = "<group>"; };
6186554410D7486E00B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUAutomaticUpdateAlert.nib; sourceTree = "<group>"; };
6186554510D7488400B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUUpdateAlert.nib; sourceTree = "<group>"; };
618915700E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUUpdatePermissionPrompt.nib; sourceTree = "<group>"; };
618915710E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUUpdateAlert.nib; sourceTree = "<group>"; };
618915720E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUAutomaticUpdateAlert.nib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -756,6 +760,7 @@
zh_CN,
fr_ca,
pt_BR,
pt_PT,
);
mainGroup = 0867D691FE84028FC02AAC07 /* Sparkle */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
Expand Down Expand Up @@ -974,6 +979,7 @@
611A904610240DF700CC659E /* ja */,
61E31A80103299500051D188 /* pt_BR */,
615409C4103BBC4000125AF1 /* cs */,
6186554310D7484E00B1E074 /* pt_PT */,
);
name = Sparkle.strings;
sourceTree = "<group>";
Expand All @@ -997,6 +1003,7 @@
611A904810240E0600CC659E /* ja */,
61E31A81103299560051D188 /* pt_BR */,
615409C6103BBD9F00125AF1 /* cs */,
6186554410D7486E00B1E074 /* pt_PT */,
);
name = SUAutomaticUpdateAlert.nib;
sourceTree = "<group>";
Expand All @@ -1020,6 +1027,7 @@
611A904910240E0C00CC659E /* ja */,
61E31A821032995F0051D188 /* pt_BR */,
615409C7103BBDA600125AF1 /* cs */,
6186554510D7488400B1E074 /* pt_PT */,
);
name = SUUpdateAlert.nib;
sourceTree = "<group>";
Expand Down Expand Up @@ -1059,6 +1067,7 @@
611A904710240DFF00CC659E /* ja */,
61E31A7F103299450051D188 /* pt_BR */,
615409C5103BBC5000125AF1 /* cs */,
6186554210D7484300B1E074 /* pt_PT */,
);
name = SUUpdatePermissionPrompt.nib;
sourceTree = "<group>";
Expand Down
29 changes: 0 additions & 29 deletions da.lproj/SUAutomaticUpdateAlert.nib/classes.nib

This file was deleted.

18 changes: 0 additions & 18 deletions da.lproj/SUAutomaticUpdateAlert.nib/info.nib

This file was deleted.

Binary file modified da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
Binary file not shown.
Binary file modified da.lproj/SUAutomaticUpdateAlert.strings 100644 → 100755
Binary file not shown.
39 changes: 0 additions & 39 deletions da.lproj/SUUpdateAlert.nib/classes.nib

This file was deleted.

16 changes: 0 additions & 16 deletions da.lproj/SUUpdateAlert.nib/info.nib

This file was deleted.

Binary file modified da.lproj/SUUpdateAlert.nib/keyedobjects.nib
Binary file not shown.
Binary file modified da.lproj/SUUpdateAlert.strings 100644 → 100755
Binary file not shown.
34 changes: 0 additions & 34 deletions da.lproj/SUUpdatePermissionPrompt.nib/classes.nib

This file was deleted.

10 changes: 0 additions & 10 deletions da.lproj/SUUpdatePermissionPrompt.nib/data.dependency

This file was deleted.

16 changes: 0 additions & 16 deletions da.lproj/SUUpdatePermissionPrompt.nib/info.nib

This file was deleted.

Binary file modified da.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
Binary file not shown.
Binary file modified da.lproj/Sparkle.strings 100644 → 100755
Binary file not shown.

0 comments on commit 61291c7

Please sign in to comment.