diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2009-06-19 20:35:17 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:13:57 +0000 |
commit | 245cce8a71ed97c46820817aac27bb5874455efc (patch) | |
tree | 2cc2bbc1be142bfce2dc3969bf8585b29a14e6ba | |
parent | 282af023868a0848d6a2f98d29f5ffef85531265 (diff) |
OMG, that was a stupid Browser bug.
-rw-r--r-- | UICaboodle/BrowserView.h | 3 | ||||
-rw-r--r-- | UICaboodle/BrowserView.mm | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index af083d3..f1a9dbc 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -76,6 +76,8 @@ CGSize size_; bool editing_; + + Class class_; } - (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button; @@ -94,6 +96,7 @@ - (id) initWithBook:(RVBook *)book; - (id) initWithBook:(RVBook *)book forWidth:(float)width; +- (id) initWithBook:(RVBook *)book forWidth:(float)width ofClass:(Class)_class; - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script; - (void) callFunction:(WebScriptObject *)function; diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index fee3cf0..b99c2d2 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -643,7 +643,7 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( [self setBackButtonTitle:title_]; - BrowserView *browser([[[BrowserView alloc] initWithBook:book] autorelease]); + BrowserView *browser([[[class_ alloc] initWithBook:book] autorelease]); [browser loadURL:url]; page = browser; } @@ -896,7 +896,7 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( RVBook *book(!popup_ ? book_ : [[[RVPopUpBook alloc] initWithFrame:[delegate_ popUpBounds]] autorelease]); /* XXX: deal with cydia:// pages */ - BrowserView *browser([[[BrowserView alloc] initWithBook:book forWidth:width] autorelease]); + BrowserView *browser([[[class_ alloc] initWithBook:book forWidth:width] autorelease]); if (features != nil && popup_) { [book setDelegate:delegate_]; @@ -1158,8 +1158,9 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( [self _setTileDrawingEnabled:YES]; } -- (id) initWithBook:(RVBook *)book forWidth:(float)width { +- (id) initWithBook:(RVBook *)book forWidth:(float)width ofClass:(Class)_class { if ((self = [super initWithBook:book]) != nil) { + class_ = _class; loading_ = [[NSMutableSet alloc] initWithCapacity:3]; popup_ = false; @@ -1289,6 +1290,10 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( } return self; } +- (id) initWithBook:(RVBook *)book forWidth:(float)width { + return [self initWithBook:book forWidth:width ofClass:[self class]]; +} + - (id) initWithBook:(RVBook *)book { return [self initWithBook:book forWidth:0]; } |