summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-04 15:56:07 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:36 -0800
commit8ea7249140d2c49f8008e60ef8dd287d23d29124 (patch)
tree4ad3d5d4f144448bedbc36d7519c49021a5fe130
parent9eae15b8f95d97da332e42847cc340894dbcc1c4 (diff)
When possible, use openURL:asPanel for _openMailToURL:.
-rw-r--r--CyteKit/WebViewController.mm6
-rw-r--r--iPhonePrivate.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index c6033bc..e6f7e45 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -286,7 +286,11 @@ float CYScrollViewDecelerationRateNormal;
}
- (void) _openMailToURL:(NSURL *)url {
- [[UIApplication sharedApplication] openURL:url];// asPanel:YES];
+ UIApplication *app([UIApplication sharedApplication]);
+ if ([app respondsToSelector:@selector(openURL:asPanel:)])
+ [app openURL:url asPanel:YES];
+ else
+ [app openURL:url];
}
- (bool) _allowJavaScriptPanel {
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index ea0fe34..fdcb147 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -200,6 +200,7 @@ typedef enum {
- (void) applicationWillResignActive:(UIApplication *)application;
- (void) applicationWillSuspend;
- (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
+- (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
- (void) setStatusBarShowsProgress:(BOOL)shows;
- (void) _setSuspended:(BOOL)suspended;
- (void) terminateWithSuccess;