]> git.saurik.com Git - cydia.git/commitdiff
Porting, webkit stability.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 1 Sep 2008 15:06:17 +0000 (15:06 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:28 +0000 (07:08 +0000)
UICaboodle/BrowserView.h
UICaboodle/RVBook.h
UICaboodle/RVBook.mm
UICaboodle/RVPage.h
UICaboodle/RVPage.mm
UICaboodle/ResetView.h

index caafaa52e665410c0f0cc3d083ce5715442ce0b0..7a227d0be42c73d5a57e583a530d7261683d4784 100644 (file)
@@ -7,18 +7,20 @@
 
 @class UIProgressIndicator;
 @class UIScroller;
-@class UIWebView;
+@class UIDocumentWebView;
 
 @class WebView;
 
 @class Database;
+@class IndirectDelegate;
 
 @interface BrowserView : RVPage {
     _transient Database *database_;
     UIScroller *scroller_;
-    UIWebView *webview_;
+    UIWebDocumentView *webview_;
     NSMutableArray *urls_;
     UIProgressIndicator *indicator_;
+    IndirectDelegate *indirect_;
 
     NSString *title_;
     bool loading_;
index 43078fcb5ea65ea8d613eacb798bd869ab676edf..8b0518515db98b569eb3a16a8ae5e634bf7e2876 100644 (file)
@@ -21,6 +21,8 @@
     _transient id delegate_;
 }
 
+- (UINavigationBar *) navigationBar;
+
 - (id) initWithFrame:(CGRect)frame;
 - (void) setDelegate:(id)delegate;
 
@@ -29,8 +31,6 @@
 - (void) pushPage:(RVPage *)page;
 - (void) popPages:(unsigned)pages;
 
-- (void) setPrompt:(NSString *)prompt;
-
 - (void) resetViewAnimated:(BOOL)animated;
 - (void) resetViewAnimated:(BOOL)animated toPage:(RVPage *)page;
 
index 9315cae91c1e14dd39418acadd963ced754b52fd..cef1acee62e297fb58d8ac6e6f68792f4753030b 100644 (file)
     [super dealloc];
 }
 
+- (UINavigationBar *) navigationBar {
+    return navbar_;
+}
+
 - (void) navigationBar:(UINavigationBar *)navbar buttonClicked:(int)button {
     _assert([pages_ count] != 0);
     RVPage *page = [pages_ lastObject];
@@ -52,7 +56,7 @@
         pages_ = [[NSMutableArray arrayWithCapacity:4] retain];
 
         struct CGRect bounds = [self bounds];
-        CGSize navsize = [UINavigationBar defaultSizeWithPrompt];
+        CGSize navsize = [UINavigationBar defaultSize];
         CGRect navrect = {{0, 0}, navsize};
 
         navbar_ = [[UINavigationBar alloc] initWithFrame:navrect];
@@ -61,8 +65,6 @@
         [navbar_ setBarStyle:0];
         [navbar_ setDelegate:self];
 
-        [navbar_ setPrompt:@""];
-
         transition_ = [[UITransitionView alloc] initWithFrame:CGRectMake(
             bounds.origin.x, bounds.origin.y + navsize.height, bounds.size.width, bounds.size.height - navsize.height
         )];
     [navbar_ pushNavigationItem:navitem];
 
     BOOL animated = [pages_ count] == 0 ? NO : YES;
+    [page setFrame:[transition_ bounds]];
     [transition_ transition:(animated ? 1 : 0) toView:page];
     [page setPageActive:YES];
 
     [self resetViewAnimated:YES toPage:[pages_ lastObject]];
 }
 
-- (void) setPrompt:(NSString *)prompt {
-    [navbar_ setPrompt:prompt];
-}
-
 - (void) resetViewAnimated:(BOOL)animated {
     resetting_ = true;
 
 
 - (void) resetViewAnimated:(BOOL)animated toPage:(RVPage *)page {
     [page resetViewAnimated:animated];
+    [page setFrame:[transition_ bounds]];
     [transition_ transition:(animated ? 2 : 0) toView:page];
     [page setPageActive:YES];
     [self reloadButtonsForPage:page];
     if ([pages_ count] == 0 || page != [pages_ lastObject])
         return;
     NSString *leftButtonTitle([page leftButtonTitle]);
-    RVUINavBarButtonStyle leftButtonStyle = [page leftButtonStyle];
-    RVUINavBarButtonStyle rightButtonStyle = [page rightButtonStyle];
+    UINavigationButtonStyle leftButtonStyle = [page leftButtonStyle];
+    UINavigationButtonStyle rightButtonStyle = [page rightButtonStyle];
     //[navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle] leftBack:(leftButtonTitle == nil)];
 
     [navbar_
index 8b0a2e41619e0478a88406bc471fbbb330a44840..67b73d68744a1fca2286f3ff84b8d797a9c3a422 100644 (file)
@@ -1,13 +1,6 @@
 #import "UICaboodle.h"
 
-#import <UIKit/UIView.h>
-
-enum RVUINavBarButtonStyle {
-    RVUINavBarButtonStyleNormal,
-    RVUINavBarButtonStyleBack,
-    RVUINavBarButtonStyleHighlighted,
-    RVUINavBarButtonStyleDestructive
-};
+#import <UIKit/UIKit.h>
 
 @class NSString;
 @class RVBook;
@@ -23,8 +16,8 @@ enum RVUINavBarButtonStyle {
 - (NSString *) leftButtonTitle;
 - (UIView *) accessoryView;
 
-- (RVUINavBarButtonStyle) leftButtonStyle;
-- (RVUINavBarButtonStyle) rightButtonStyle;
+- (UINavigationButtonStyle) leftButtonStyle;
+- (UINavigationButtonStyle) rightButtonStyle;
 
 - (void) _rightButtonClicked;
 - (void) _leftButtonClicked;
index ee85a7ed6c4b6ca7d7a7f521b4dfbed6e93a3112..5d29a2668f6586ba4827f6521bd68de601d0051c 100644 (file)
@@ -1,7 +1,7 @@
 #import "RVPage.h"
 
 #import <Foundation/Foundation.h>
-#import <UIKit/UIView.h>
+#import <UIKit/UIKit.h>
 
 #import "RVBook.h"
 
     return nil;
 }
 
-- (RVUINavBarButtonStyle) leftButtonStyle {
-    return [self leftButtonTitle] == nil ? RVUINavBarButtonStyleBack : RVUINavBarButtonStyleNormal;
+- (UINavigationButtonStyle) leftButtonStyle {
+    return [self leftButtonTitle] == nil ? UINavigationButtonStyleBack : UINavigationButtonStyleNormal;
 }
 
-- (RVUINavBarButtonStyle) rightButtonStyle {
-    return RVUINavBarButtonStyleNormal;
+- (UINavigationButtonStyle) rightButtonStyle {
+    return UINavigationButtonStyleNormal;
 }
 
 - (void) _rightButtonClicked {
index c4eb3f72fb5f36f10d8268e0b17f1282469832c8..903bec083b981d390508efd7202511ba4efe1305 100644 (file)
@@ -1,8 +1,7 @@
 #import <RVPage.h>
 #import <RVBook.h>
 
-#import <UIKit/UISectionList.h>
-#import <UIKit/UITable.h>
+#import <UIKit/UIKit.h>
 
 @interface UIView (RVBook)
 - (void) resetViewAnimated:(BOOL)animated;