summaryrefslogtreecommitdiff
path: root/UICaboodle/BrowserView.m
diff options
context:
space:
mode:
Diffstat (limited to 'UICaboodle/BrowserView.m')
-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];