summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-02-25 06:58:19 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:09:43 +0000
commitbd0a4099eec1afbfaefa65545259b7096daf8bfd (patch)
tree8c2cb6c74ba3c391b1cbee7a4f235790ee5afeaf /UICaboodle
parent5d774a8892d28544253b65ef85916e5848dba716 (diff)
A few, minor, accumulated fixes.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.h2
-rw-r--r--UICaboodle/BrowserView.m11
2 files changed, 9 insertions, 4 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h
index cbb407f..a3e1830 100644
--- a/UICaboodle/BrowserView.h
+++ b/UICaboodle/BrowserView.h
@@ -81,4 +81,6 @@
+ (float) defaultWidth;
+- (id) _rightButtonTitle;
+
@end
diff --git a/UICaboodle/BrowserView.m b/UICaboodle/BrowserView.m
index e7dd58b..f3c1e3a 100644
--- a/UICaboodle/BrowserView.m
+++ b/UICaboodle/BrowserView.m
@@ -355,6 +355,8 @@
if (![self _allowJavaScriptPanel])
return;
+ [self retain];
+
UIActionSheet *sheet = [[[UIActionSheet alloc]
initWithTitle:nil
buttons:[NSArray arrayWithObjects:@"OK", nil]
@@ -375,7 +377,7 @@
initWithTitle:nil
buttons:[NSArray arrayWithObjects:@"OK", @"Cancel", nil]
defaultButtonIndex:0
- delegate:self
+ delegate:indirect_
context:@"confirm"
] autorelease];
@@ -571,9 +573,10 @@
- (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button {
NSString *context([sheet context]);
- if ([context isEqualToString:@"alert"])
+ if ([context isEqualToString:@"alert"]) {
+ [self autorelease];
[sheet dismiss];
- else if ([context isEqualToString:@"confirm"]) {
+ } else if ([context isEqualToString:@"confirm"]) {
switch (button) {
case 1:
confirm_ = [NSNumber numberWithBool:YES];
@@ -689,7 +692,7 @@
/* XXX: deal with cydia:// pages */
BrowserView *browser([[[BrowserView alloc] initWithBook:book forWidth:width] autorelease]);
- if (features == nil && popup_) {
+ if (features != nil && popup_) {
[book setDelegate:delegate_];
[browser setDelegate:delegate_];