From: Jay Freeman (saurik) Date: Fri, 4 Mar 2011 23:56:07 +0000 (-0800) Subject: When possible, use openURL:asPanel for _openMailToURL:. X-Git-Tag: v1.1.0%b1~70 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/8ea7249140d2c49f8008e60ef8dd287d23d29124 When possible, use openURL:asPanel for _openMailToURL:. --- diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index c6033bcd..e6f7e45c 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 ea0fe349..fdcb147b 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;