From 2e26757e06b229171a086c32f9d91990990726d8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 28 Feb 2011 05:27:32 -0800 Subject: Remove obsolete cydia.setPopUpHook(). --- UICaboodle/BrowserView.h | 4 ---- UICaboodle/BrowserView.mm | 30 ++---------------------------- UICaboodle/RVBook.h | 15 --------------- UICaboodle/RVBook.mm | 28 ---------------------------- UICaboodle/RVPage.mm | 2 -- 5 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 UICaboodle/RVBook.h delete mode 100644 UICaboodle/RVBook.mm (limited to 'UICaboodle') diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index 636405c..1d87d61 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -1,5 +1,4 @@ #import -#import #import @@ -61,7 +60,6 @@ @interface BrowserController : CYViewController < CYWebViewDelegate, - HookProtocol, UIWebViewDelegate > { _transient CYWebView *webview_; @@ -84,7 +82,6 @@ _H style_; _H function_; - WebScriptObject *closer_; float width_; Class class_; @@ -124,7 +121,6 @@ - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; - (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; -- (void) setPopupHook:(id)function; - (void) setHidesNavigationBar:(bool)value; - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button; diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index f03c939..4484da3 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -69,9 +69,7 @@ float CYScrollViewDecelerationRateNormal; @end /* Indirect Delegate {{{ */ -@interface IndirectDelegate : NSObject < - HookProtocol -> { +@interface IndirectDelegate : NSObject { _transient volatile id delegate_; } @@ -90,11 +88,6 @@ float CYScrollViewDecelerationRateNormal; return self; } -- (void) didDismissModalViewController { - if (delegate_ != nil) - return [delegate_ didDismissModalViewController]; -} - - (IMP) methodForSelector:(SEL)sel { if (IMP method = [super methodForSelector:sel]) return method; @@ -480,9 +473,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se if (challenge_ != nil) [challenge_ release]; - if (closer_ != nil) - [closer_ release]; - if (title_ != nil) [title_ release]; @@ -591,15 +581,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [self performSelectorOnMainThread:@selector(applyRightButton) withObject:nil waitUntilDone:NO]; } -- (void) setPopupHook:(id)function { - if (closer_ != nil) - [closer_ autorelease]; - if (function == nil) - closer_ = nil; - else - closer_ = [function retain]; -} - - (void) scrollToBottomAnimated:(NSNumber *)animated { CGSize size([scroller_ contentSize]); CGPoint offset([scroller_ contentOffset]); @@ -694,9 +675,8 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [[self navigationController] pushViewController:page animated:YES]; } else { - UCNavigationController *navigation([[[UCNavigationController alloc] initWithRootViewController:page] autorelease]); + UINavigationController *navigation([[[UINavigationController alloc] initWithRootViewController:page] autorelease]); - [navigation setHook:indirect_]; [navigation setDelegate:delegate_]; [[page navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] @@ -839,7 +819,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se custom_ = nil; style_ = nil; function_ = nil; - CYRelease(closer_); [self setHidesNavigationBar:NO]; @@ -1139,11 +1118,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se } return self; } -- (void) didDismissModalViewController { - if (closer_ != nil) - [self callFunction:closer_]; -} - - (void) callFunction:(WebScriptObject *)function { WebThreadLocked lock; diff --git a/UICaboodle/RVBook.h b/UICaboodle/RVBook.h deleted file mode 100644 index 340db4d..0000000 --- a/UICaboodle/RVBook.h +++ /dev/null @@ -1,15 +0,0 @@ -#import - -#import - -@protocol HookProtocol -- (void) didDismissModalViewController; -@end - -@interface UCNavigationController : UINavigationController { - _transient id hook_; -} - -- (void) setHook:(id)hook; - -@end diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm deleted file mode 100644 index e714de0..0000000 --- a/UICaboodle/RVBook.mm +++ /dev/null @@ -1,28 +0,0 @@ -#import "RVBook.h" - -#import - -#import -#import - -#include -#include - -#include - -#import "RVPage.h" - -@implementation UCNavigationController - -- (void) setHook:(id)hook { - hook_ = hook; -} - -- (void) dismissModalViewControllerAnimated:(BOOL)animated { - [super dismissModalViewControllerAnimated:YES]; - - if (hook_ != nil) - [hook_ didDismissModalViewController]; -} - -@end diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm index 8d6ea82..40e54cd 100644 --- a/UICaboodle/RVPage.mm +++ b/UICaboodle/RVPage.mm @@ -3,8 +3,6 @@ #import #import -#import "RVBook.h" - extern bool IsWildcat_; @implementation UIViewController (Cydia) -- cgit v1.2.3