mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Replace id with specific types where appropriate.
This commit is contained in:
1 parent
9984eb9ba3
commit
435f89c11f
3 files changed
+10
-7
No files matched your search
+7
-4
@@ -17,12 +17,15 @@
|
||||
{
|
||||
static NSDictionary *typeSelectorDictionary;
|
||||
if (!typeSelectorDictionary)
|
||||
typeSelectorDictionary = [@{@".zip": @"extractZIP", @".tar": @"extractTAR",
|
||||
@".tar.gz": @"extractTGZ", @".tgz": @"extractTGZ",
|
||||
@".tar.bz2": @"extractTBZ", @".tbz": @"extractTBZ"} retain];
|
||||
typeSelectorDictionary = [@{@".zip": @"extractZIP",
|
||||
@".tar": @"extractTAR",
|
||||
@".tar.gz": @"extractTGZ",
|
||||
@".tgz": @"extractTGZ",
|
||||
@".tar.bz2": @"extractTBZ",
|
||||
@".tbz": @"extractTBZ"} retain];
|
||||
|
||||
NSString *lastPathComponent = [path lastPathComponent];
|
||||
for (id currentType in typeSelectorDictionary)
|
||||
for (NSString *currentType in typeSelectorDictionary)
|
||||
{
|
||||
if ([currentType length] > [lastPathComponent length]) continue;
|
||||
if ([[lastPathComponent substringFromIndex:[lastPathComponent length] - [currentType length]] isEqualToString:currentType])
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
// If this is a background application we need to focus it in order to bring the prompt
|
||||
// to the user's attention. Otherwise the prompt would be hidden behind other applications and
|
||||
// the user would not know why the application was paused.
|
||||
if ([aHost isBackgroundApplication]) { [NSApp activateIgnoringOtherApps:YES]; }
|
||||
if ([aHost isBackgroundApplication]) { [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; }
|
||||
|
||||
id prompt = [[[[self class] alloc] initWithHost:aHost systemProfile:profile delegate:d] autorelease];
|
||||
SUUpdatePermissionPrompt *prompt = [[[[self class] alloc] initWithHost:aHost systemProfile:profile delegate:d] autorelease];
|
||||
[NSApp runModalForWindow:[prompt window]];
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -259,7 +259,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
[self putFeedURLIntoDictionary:theDict]; // Get feed URL on main thread, it's not safe to call elsewhere.
|
||||
});
|
||||
|
||||
const char *hostname = [[theDict[@"feedURL"] host] cStringUsingEncoding: NSUTF8StringEncoding];
|
||||
const char *hostname = [[(NSURL *)theDict[@"feedURL"] host] cStringUsingEncoding: NSUTF8StringEncoding];
|
||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, hostname);
|
||||
Boolean reachabilityResult = NO;
|
||||
// If the feed's using a file:// URL, we won't be able to use reachability.
|
||||
|
||||
Reference in new issue
Block a user