diff options
-rw-r--r-- | MobileCydia.mm | 6 | ||||
-rw-r--r-- | UICaboodle/BrowserView.h | 4 | ||||
-rw-r--r-- | UICaboodle/BrowserView.mm | 30 | ||||
-rw-r--r-- | UICaboodle/RVBook.h | 15 | ||||
-rw-r--r-- | UICaboodle/RVBook.mm | 28 | ||||
-rw-r--r-- | UICaboodle/RVPage.mm | 2 |
6 files changed, 2 insertions, 83 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 0648e4c..2b8a9cc 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4279,8 +4279,6 @@ static NSMutableSet *Diversions_; return @"setNavigationBarStyle"; else if (selector == @selector(setNavigationBarTintRed:green:blue:alpha:)) return @"setNavigationBarTintColor"; - else if (selector == @selector(setPopupHook:)) - return @"setPopupHook"; else if (selector == @selector(setToken:)) return @"setToken"; else if (selector == @selector(setViewportWidth:)) @@ -4527,10 +4525,6 @@ static NSMutableSet *Diversions_; [self performSelectorOnMainThread:@selector(_setToken:) withObject:token waitUntilDone:NO]; } -- (void) setPopupHook:(id)function { - [indirect_ setPopupHook:function]; -} - - (void) scrollToBottom:(NSNumber *)animated { [indirect_ performSelectorOnMainThread:@selector(scrollToBottomAnimated:) withObject:animated waitUntilDone:NO]; } 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 <UICaboodle/RVPage.h> -#import <UICaboodle/RVBook.h> #import <UIKit/UIKit.h> @@ -61,7 +60,6 @@ @interface BrowserController : CYViewController < CYWebViewDelegate, - HookProtocol, UIWebViewDelegate > { _transient CYWebView *webview_; @@ -84,7 +82,6 @@ _H<NSString> style_; _H<WebScriptObject> 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 <UICaboodle/UCPlatform.h> - -#import <UIKit/UIKit.h> - -@protocol HookProtocol -- (void) didDismissModalViewController; -@end - -@interface UCNavigationController : UINavigationController { - _transient id<HookProtocol> hook_; -} - -- (void) setHook:(id<HookProtocol>)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 <UIKit/UIKit.h> - -#import <Foundation/Foundation.h> -#import <CoreGraphics/CGGeometry.h> - -#include <cstdio> -#include <cstdlib> - -#include <errno.h> - -#import "RVPage.h" - -@implementation UCNavigationController - -- (void) setHook:(id<HookProtocol>)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 <Foundation/Foundation.h> #import <UIKit/UIKit.h> -#import "RVBook.h" - extern bool IsWildcat_; @implementation UIViewController (Cydia) |