summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-03-17 23:41:45 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:09:59 +0000
commitd8ac46da30987b973a34271651c41f346ab8a9c6 (patch)
treef092e74dd5af4050b71026411a5a50ec8ea7c72f /UICaboodle
parentdc63e78f274cc5733250b137b1ad09ea248445ff (diff)
Some minor popup fixes for mailto URLs.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.m37
1 files changed, 21 insertions, 16 deletions
diff --git a/UICaboodle/BrowserView.m b/UICaboodle/BrowserView.m
index 3a4b779..5cfc3d0 100644
--- a/UICaboodle/BrowserView.m
+++ b/UICaboodle/BrowserView.m
@@ -567,25 +567,30 @@
} else if ([name isEqualToString:@"_open"])
[delegate_ openURL:url];
else if ([name isEqualToString:@"_popup"]) {
- RVBook *book([[[RVPopUpBook alloc] initWithFrame:[delegate_ popUpBounds]] autorelease]);
- [book setHook:indirect_];
-
- RVPage *page([delegate_ pageForURL:url hasTag:NULL]);
- if (page == nil) {
- /* XXX: call createWebViewWithRequest instead? */
+ NSString *scheme([[url scheme] lowercaseString]);
+ if ([scheme isEqualToString:@"mailto"])
+ [delegate_ openMailToURL:url];
+ else {
+ RVBook *book([[[RVPopUpBook alloc] initWithFrame:[delegate_ popUpBounds]] autorelease]);
+ [book setHook:indirect_];
+
+ RVPage *page([delegate_ pageForURL:url hasTag:NULL]);
+ if (page == nil) {
+ /* XXX: call createWebViewWithRequest instead? */
+
+ [self setBackButtonTitle:title_];
+
+ BrowserView *browser([[[BrowserView alloc] initWithBook:book] autorelease]);
+ [browser loadURL:url];
+ page = browser;
+ }
- [self setBackButtonTitle:title_];
+ [book setDelegate:delegate_];
+ [page setDelegate:delegate_];
- BrowserView *browser([[[BrowserView alloc] initWithBook:book] autorelease]);
- [browser loadURL:url];
- page = browser;
+ [book setPage:page];
+ [book_ pushBook:book];
}
-
- [book setDelegate:delegate_];
- [page setDelegate:delegate_];
-
- [book setPage:page];
- [book_ pushBook:book];
} else goto unknown;
[listener ignore];