]> git.saurik.com Git - cydia.git/commitdiff
When possible, use openURL:asPanel for _openMailToURL:.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Mar 2011 23:56:07 +0000 (15:56 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:36 +0000 (02:41 -0800)
CyteKit/WebViewController.mm
iPhonePrivate.h

index c6033bcd4629244124fe3cc4ee34a76978c7a304..e6f7e45cfaa31fed0644852c261891ae8257f306 100644 (file)
@@ -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 {
index ea0fe349c549c3ef75369822329123c52576633e..fdcb147bda78489037530de2913c2ea156d69543 100644 (file)
@@ -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;