aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleHTMLOutputController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-22 21:43:22 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-22 21:43:22 +0000
commitb5bcd962ab29b4d7c455c98e03b429b3c6b11e92 (patch)
tree0794193cb8f43a9276467bc92092b951167a6bed /Source/SPBundleHTMLOutputController.m
parent9ecfa022b7c58ec178ff089b86f110552bf74d7e (diff)
downloadsequelpro-b5bcd962ab29b4d7c455c98e03b429b3c6b11e92.tar.gz
sequelpro-b5bcd962ab29b4d7c455c98e03b429b3c6b11e92.tar.bz2
sequelpro-b5bcd962ab29b4d7c455c98e03b429b3c6b11e92.zip
* enabled sequel:// url scheme commands from inside the Bundle HTML output window
Diffstat (limited to 'Source/SPBundleHTMLOutputController.m')
-rw-r--r--Source/SPBundleHTMLOutputController.m29
1 files changed, 19 insertions, 10 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 0501dba9..56fdb63e 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -190,17 +190,26 @@
{
NSInteger navigationType = [[actionInformation objectForKey:WebActionNavigationTypeKey] integerValue];
- switch(navigationType) {
- case WebNavigationTypeLinkClicked:
- [[webView mainFrame] loadRequest:request];
- [listener use];
- break;
- case WebNavigationTypeReload:
- [[webView mainFrame] loadHTMLString:[self initHTMLSourceString] baseURL:nil];
- break;
- default:
- [listener use];
+ // sequelpro:// handler
+ if([[[request URL] scheme] isEqualToString:@"sequelpro"] && navigationType == WebNavigationTypeLinkClicked) {
+ [[NSApp delegate] handleEventWithURL:[request URL]];
+ [listener ignore];
+ } else {
+
+ switch(navigationType) {
+ case WebNavigationTypeLinkClicked:
+ [[webView mainFrame] loadRequest:request];
+ [listener use];
+ break;
+ case WebNavigationTypeReload:
+ [[webView mainFrame] loadHTMLString:[self initHTMLSourceString] baseURL:nil];
+ break;
+ default:
+ [listener use];
+ }
+
}
+
}
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame