summaryrefslogtreecommitdiff
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
parentdc63e78f274cc5733250b137b1ad09ea248445ff (diff)
Some minor popup fixes for mailto URLs.
-rw-r--r--Cydia.app/package.html4
-rw-r--r--UICaboodle/BrowserView.m37
2 files changed, 23 insertions, 18 deletions
diff --git a/Cydia.app/package.html b/Cydia.app/package.html
index fdbc835..6fcc77c 100644
--- a/Cydia.app/package.html
+++ b/Cydia.app/package.html
@@ -227,7 +227,7 @@
<label>Change Package Settings</label>
</div></a>
- <a id="author-href" class="author">
+ <a id="author-href" class="author" target="_popup">
<img id="author-icon" class="icon" src="email.png"/><div>
<label>Author</label>
<label id="author"></label>
@@ -335,7 +335,7 @@
<label id="size"></label>
</div></div>
- <a id="maintainer-href" class="maintainer">
+ <a id="maintainer-href" class="maintainer" target="_popup">
<img id="maintainer-icon" class="icon" src="email.png"/><div>
<label>Contact</label>
<label id="maintainer"></label>
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];