diff options
author | Max <post@wickenrode.com> | 2014-12-13 17:20:18 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-12-13 17:20:18 +0100 |
commit | 994057ae2a82dc110a385ced4239ce49cc0601f8 (patch) | |
tree | d874e74e189f14eb1044daad31df88ec562776d2 /Source/SPBundleHTMLOutputController.m | |
parent | 3cf0254e55d558565775e6cb20d36ea7e54beca1 (diff) | |
download | sequelpro-994057ae2a82dc110a385ced4239ce49cc0601f8.tar.gz sequelpro-994057ae2a82dc110a385ced4239ce49cc0601f8.tar.bz2 sequelpro-994057ae2a82dc110a385ced4239ce49cc0601f8.zip |
Add cast for [NSApp delegate]
* (Also changed some outdated URLs)
* Replaced [NSApplication sharedApplication] with NSApp
Diffstat (limited to 'Source/SPBundleHTMLOutputController.m')
-rw-r--r-- | Source/SPBundleHTMLOutputController.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index da82d768..ed1142a2 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -260,7 +260,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; [c displayHTMLContent:[NSString stringWithFormat:@"<pre>%@</pre>", [sourceCode HTMLEscapeString]] withOptions:nil]; - [[NSApp delegate] addHTMLOutputController:c]; + [SPAppDelegate addHTMLOutputController:c]; } - (void)saveDocument @@ -294,7 +294,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; windowUUID = @""; docUUID = @""; - [[NSApp delegate] removeHTMLOutputController:self]; + [SPAppDelegate removeHTMLOutputController:self]; [self release]; } @@ -332,7 +332,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; if(request != nil) { SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init]; [c displayURLString:[[request URL] absoluteString] withOptions:nil]; - [[NSApp delegate] addHTMLOutputController:c]; + [SPAppDelegate addHTMLOutputController:c]; return [c webView]; } return nil; @@ -351,7 +351,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; // sequelpro:// handler if([[[request URL] scheme] isEqualToString:@"sequelpro"] && navigationType == WebNavigationTypeLinkClicked) { - [[NSApp delegate] handleEventWithURL:[request URL]]; + [SPAppDelegate handleEventWithURL:[request URL]]; [listener ignore]; } // sp-reveal-file://a_file_path reveals the file in Finder @@ -571,7 +571,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; */ - (NSString *)getShellEnvironmentForName:(NSString*)keyName { - return [[[NSApp delegate] shellEnvironmentForDocument:nil] objectForKey:keyName]; + return [[SPAppDelegate shellEnvironmentForDocument:nil] objectForKey:keyName]; } /** @@ -691,7 +691,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; output = [SPBundleCommandRunner runBashCommand:command withEnvironment:nil atCurrentDirectoryPath:nil error:&err]; else { NSMutableDictionary *theEnv = [NSMutableDictionary dictionary]; - [theEnv addEntriesFromDictionary:[[NSApp delegate] shellEnvironmentForDocument:nil]]; + [theEnv addEntriesFromDictionary:[SPAppDelegate shellEnvironmentForDocument:nil]]; [theEnv setObject:uuid forKey:SPBundleShellVariableProcessID]; [theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryInputPathHeader, uuid] forKey:SPBundleShellVariableQueryFile]; [theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultPathHeader, uuid] forKey:SPBundleShellVariableQueryResultFile]; @@ -701,7 +701,7 @@ static NSString *SPSaveDocumentAction = @"SPSaveDocument"; output = [SPBundleCommandRunner runBashCommand:command withEnvironment:theEnv atCurrentDirectoryPath:nil - callerInstance:[NSApp delegate] + callerInstance:SPAppDelegate contextInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"JavaScript", @"name", NSLocalizedString(@"General", @"general menu item label"), @"scope", |