]> git.saurik.com Git - cydia.git/blobdiff - UICaboodle/RVBook.mm
Timeouts, update cancel, update /bar/, webkit stability, url throttling.
[cydia.git] / UICaboodle / RVBook.mm
index ccd3e426b0235d0ba9875a4c37675c36dc21f2ae..9315cae91c1e14dd39418acadd963ced754b52fd 100644 (file)
@@ -8,6 +8,14 @@
 #import <UIKit/UIView-Geometry.h>
 #import <UIKit/UIView-Hierarchy.h>
 
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CGGeometry.h>
+
+#include <cstdio>
+#include <cstdlib>
+
+#include <errno.h>
+
 #import "RVPage.h"
 
 @implementation RVBook
     [pages_ addObject:page];
     [self reloadButtonsForPage:page];
 
-    if ([navbar_ respondsToSelector:@selector(setAccessoryView:animate:goingBack:)])
-        [navbar_ setAccessoryView:[page accessoryView] animate:animated goingBack:NO];
-    else
-        [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+    [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
 }
 
 - (void) popPages:(unsigned)pages {
     [page setPageActive:YES];
     [self reloadButtonsForPage:page];
 
-    if ([navbar_ respondsToSelector:@selector(setAccessoryView:animate:goingBack:)])
-        [navbar_ setAccessoryView:[page accessoryView] animate:animated goingBack:YES];
-    else
-        [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+    [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
 }
 
 - (void) setTitle:(NSString *)title forPage:(RVPage *)page {
 - (void) reloadButtonsForPage:(RVPage *)page {
     if ([pages_ count] == 0 || page != [pages_ lastObject])
         return;
-    NSString *leftButtonTitle([pages_ count] == 1 ? [page leftButtonTitle] : nil);
-    [navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle]];
+    NSString *leftButtonTitle([page leftButtonTitle]);
+    RVUINavBarButtonStyle leftButtonStyle = [page leftButtonStyle];
+    RVUINavBarButtonStyle rightButtonStyle = [page rightButtonStyle];
+    //[navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle] leftBack:(leftButtonTitle == nil)];
+
+    [navbar_
+        showLeftButton:leftButtonTitle
+        withStyle:leftButtonStyle
+        rightButton:[page rightButtonTitle]
+        withStyle:rightButtonStyle
+    ];
 }
 
 - (NSString *) getTitleForPage:(RVPage *)page {