X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/f99f86e24e844ab573ab88d3100da00b7772ae36..aaa0be197591295ad82970b51ceb24cb4dbeee10:/UICaboodle/BrowserView.mm diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index ee8563f0..e2dee3b5 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -161,7 +161,7 @@ static Class $UIWebBrowserView; @implementation WebScriptObject (UICaboodle) -- (unsigned) count { +- (NSUInteger) count { id length([self valueForKey:@"length"]); if ([length respondsToSelector:@selector(intValue)]) return [length intValue]; @@ -413,7 +413,7 @@ static Class $UIWebBrowserView; [self view:sender didSetFrame:frame]; } -- (void) pushPage:(UCViewController *)page { +- (void) pushPage:(CYViewController *)page { [page setDelegate:delegate_]; [[self navigationItem] setTitle:title_]; [[self navigationController] pushViewController:page animated:YES]; @@ -427,7 +427,7 @@ static Class $UIWebBrowserView; [[self navigationController] pushViewController:self animated:YES]; } -- (void) swapPage:(UCViewController *)page { +- (void) swapPage:(CYViewController *)page { [page setDelegate:delegate_]; if (pushed_) [[self navigationController] popViewControllerAnimated:NO]; @@ -439,7 +439,7 @@ static Class $UIWebBrowserView; NSLog(@"getSpecial:%@", url); #endif - if (UCViewController *page = [delegate_ pageForURL:url hasTag:NULL]) { + if (CYViewController *page = [delegate_ pageForURL:url hasTag:NULL]) { if (swap) [self swapPage:page]; else @@ -662,7 +662,7 @@ static Class $UIWebBrowserView; UCNavigationController *navigation([[[UCNavigationController alloc] init] autorelease]); [navigation setHook:indirect_]; - UCViewController *page([delegate_ pageForURL:url hasTag:NULL]); + CYViewController *page([delegate_ pageForURL:url hasTag:NULL]); if (page == nil) { /* XXX: call createWebViewWithRequest instead? */ @@ -759,10 +759,10 @@ static Class $UIWebBrowserView; goto ignore; } - int store(_not(int)); + NSInteger store(_not(NSInteger)); if (NSURL *itms = [url itmsURL:&store]) { #if LogBrowser - NSLog(@"itms#%@#%u#%@", url, store, itms); + NSLog(@"itms#%@#%d#%@", url, (int) store, itms); #endif if (capability != nil && ( @@ -1075,6 +1075,10 @@ static Class $UIWebBrowserView; return [customItem autorelease]; } +- (UIBarButtonItem *) rightButton { + return reloaditem_; +} + - (void) applyLoadingTitle { [[self navigationItem] setTitle:UCLocalize("LOADING")]; } @@ -1087,7 +1091,7 @@ static Class $UIWebBrowserView; } else if (button_) { [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES]; } else { - [[self navigationItem] setRightBarButtonItem:reloaditem_ animated:YES]; + [[self navigationItem] setRightBarButtonItem:[self rightButton] animated:YES]; } } @@ -1140,7 +1144,7 @@ static Class $UIWebBrowserView; if ([frame parentFrame] == nil) { if (DOMDocument *document = [frame DOMDocument]) if (DOMNodeList *bodies = [document getElementsByTagName:@"body"]) - for (DOMHTMLBodyElement *body in bodies) { + for (DOMHTMLBodyElement *body in (id) bodies) { DOMCSSStyleDeclaration *style([document getComputedStyle:body pseudoElement:nil]); bool colored(false); @@ -1157,7 +1161,7 @@ static Class $UIWebBrowserView; UIColor *uic(nil); if (red == 0xc7 && green == 0xce && blue == 0xd5) - uic = [UIColor pinStripeColor]; + uic = [UIColor groupTableViewBackgroundColor]; else if (alpha != 0) uic = [UIColor colorWithRed:(red / 255) @@ -1174,7 +1178,7 @@ static Class $UIWebBrowserView; } if (!colored) - [scroller_ setBackgroundColor:[UIColor pinStripeColor]]; + [scroller_ setBackgroundColor:[UIColor groupTableViewBackgroundColor]]; break; } } @@ -1351,7 +1355,7 @@ static Class $UIWebBrowserView; [[self view] addSubview:scroller_]; [scroller_ setFixedBackgroundPattern:YES]; - [scroller_ setBackgroundColor:[UIColor pinStripeColor]]; + [scroller_ setBackgroundColor:[UIColor groupTableViewBackgroundColor]]; [scroller_ setScrollingEnabled:YES]; [scroller_ setClipsSubviews:YES]; @@ -1588,13 +1592,17 @@ static Class $UIWebBrowserView; [self reloadURL]; } +- (void) _customButtonClicked { + [self reloadButtonClicked]; +} + - (void) customButtonClicked { #if !AlwaysReload if (function_ != nil) [self callFunction:function_]; else #endif - [self reloadButtonClicked]; + [self _customButtonClicked]; } - (void) setPageActive:(BOOL)active { @@ -1604,9 +1612,6 @@ static Class $UIWebBrowserView; [[[[self navigationItem] rightBarButtonItem] view] addSubview:indicator_]; } -- (void) resetViewAnimated:(BOOL)animated { -} - - (void) setPushed:(bool)pushed { pushed_ = pushed; } @@ -1615,4 +1620,4 @@ static Class $UIWebBrowserView; return 980; } -@end \ No newline at end of file +@end