summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-05-12 01:09:14 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-05-12 01:09:14 -0700
commit93d811a2abe6e53522cb696d33717cadcefd3f69 (patch)
tree276563304504d5e0eaa0099ce7213fde5d252260 /MobileCydia.mm
parent5e140adf373cffd679b499b2cbfeeb6df5d8cacb (diff)
The April Fools' dickbar has likely rotted anyway.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm88
1 files changed, 0 insertions, 88 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index f7a1dd0..f5aaaf8 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -243,8 +243,6 @@ static NSString *Warning_;
static NSString *Cache_;
-static bool AprilFools_;
-
static void (*$SBSSetInterceptsMenuButtonForever)(bool);
static CFStringRef (*$MGCopyAnswer)(CFStringRef);
@@ -7547,7 +7545,6 @@ if (kCFCoreFoundationVersionNumber < 800) {
/* Changes Controller {{{ */
@interface ChangesController : CyteViewController <
- CyteWebViewDelegate,
UITableViewDataSource,
UITableViewDelegate
> {
@@ -7556,10 +7553,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
_H<NSMutableArray> packages_;
_H<NSMutableArray> sections_;
_H<UITableView, 2> list_;
- _H<CyteWebView, 1> dickbar_;
unsigned upgrades_;
- _H<IndirectDelegate, 1> indirect_;
- _H<CydiaObject> cydia_;
}
- (id) initWithDatabase:(Database *)database;
@@ -7666,83 +7660,6 @@ if (kCFCoreFoundationVersionNumber < 800) {
[(UITableView *) list_ setDataSource:self];
[list_ setDelegate:self];
[view addSubview:list_];
-
- if (AprilFools_ && kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_0) {
- CGRect dickframe([view bounds]);
- dickframe.size.height = 44;
-
- dickbar_ = [[[CyteWebView alloc] initWithFrame:dickframe] autorelease];
- [dickbar_ setDelegate:self];
- [view addSubview:dickbar_];
-
- [dickbar_ setBackgroundColor:[UIColor clearColor]];
- [dickbar_ setScalesPageToFit:YES];
-
- UIWebDocumentView *document([dickbar_ _documentView]);
- [document setBackgroundColor:[UIColor clearColor]];
- [document setDrawsBackground:NO];
-
- WebView *webview([document webView]);
- [webview setShouldUpdateWhileOffscreen:NO];
-
- UIScrollView *scroller([dickbar_ scrollView]);
- [scroller setScrollingEnabled:NO];
- [scroller setFixedBackgroundPattern:YES];
- [scroller setBackgroundColor:[UIColor clearColor]];
-
- WebPreferences *preferences([webview preferences]);
- [preferences setCacheModel:WebCacheModelDocumentBrowser];
- [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
- [preferences setOfflineWebApplicationCacheEnabled:YES];
-
- [dickbar_ loadRequest:[NSURLRequest
- requestWithURL:[Diversion divertURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/#!/dickbar/", UI_]]]
- cachePolicy:NSURLRequestUseProtocolCachePolicy
- timeoutInterval:120
- ]];
-
- UIEdgeInsets inset = {44, 0, 0, 0};
- [list_ setContentInset:inset];
-
- [dickbar_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- }
-}
-
-- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)frame decisionListener:(id<WebPolicyDecisionListener>)listener {
- NSURL *url([request URL]);
- if (url == nil)
- return;
-
- if ([frame isEqualToString:@"_open"])
- [delegate_ openURL:url];
- else {
- WebFrame *frame(nil);
- if (NSDictionary *WebActionElement = [action objectForKey:@"WebActionElementKey"])
- frame = [WebActionElement objectForKey:@"WebElementFrame"];
- if (frame == nil)
- frame = [view mainFrame];
-
- WebDataSource *source([frame provisionalDataSource] ?: [frame dataSource]);
-
- CyteViewController *controller([delegate_ pageForURL:url forExternal:NO withReferrer:([request valueForHTTPHeaderField:@"Referer"] ?: [[[source request] URL] absoluteString])] ?: [[[CydiaWebViewController alloc] initWithRequest:request] autorelease]);
- [controller setDelegate:delegate_];
- [[self navigationController] pushViewController:controller animated:YES];
- }
-
- [listener ignore];
-}
-
-- (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source {
- return [CydiaWebViewController requestWithHeaders:request];
-}
-
-- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame {
- [CydiaWebViewController didClearWindowObject:window forFrame:frame withCydia:cydia_];
-}
-
-- (void) setDelegate:(id)delegate {
- [super setDelegate:delegate];
- [cydia_ setDelegate:delegate];
}
- (void) viewDidLoad {
@@ -7756,15 +7673,12 @@ if (kCFCoreFoundationVersionNumber < 800) {
packages_ = nil;
sections_ = nil;
- dickbar_ = nil;
[super releaseSubviews];
}
- (id) initWithDatabase:(Database *)database {
if ((self = [super init]) != nil) {
- indirect_ = [[[IndirectDelegate alloc] initWithDelegate:self] autorelease];
- cydia_ = [[[CydiaObject alloc] initWithDelegate:indirect_] autorelease];
database_ = database;
} return self;
}
@@ -10762,8 +10676,6 @@ int main(int argc, char *argv[]) {
Error_ = UCLocalize("ERROR");
Warning_ = UCLocalize("WARNING");
- AprilFools_ = false;
-
_trace();
int value(UIApplicationMain(argc, argv, @"Cydia", @"Cydia"));