diff options
Diffstat (limited to 'UICaboodle')
-rw-r--r-- | UICaboodle/BrowserView.h | 2 | ||||
-rw-r--r-- | UICaboodle/BrowserView.mm | 6 | ||||
-rw-r--r-- | UICaboodle/RVPage.mm | 12 |
3 files changed, 8 insertions, 12 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index f224326..efc1e6c 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -52,7 +52,7 @@ @protocol BrowserControllerDelegate - (void) retainNetworkActivityIndicator; - (void) releaseNetworkActivityIndicator; -- (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag; +- (CYViewController *) pageForURL:(NSURL *)url; @end @interface BrowserController : CYViewController < diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index 1017496..2abc02e 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -638,7 +638,7 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se if ([scheme isEqualToString:@"mailto"]) [self _openMailToURL:url]; - CYViewController *page([delegate_ pageForURL:url hasTag:NULL]); + CYViewController *page([delegate_ pageForURL:url]); if (page == nil) { BrowserController *browser([[[class_ alloc] init] autorelease]); @@ -653,13 +653,11 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [[self navigationController] pushViewController:page animated:YES]; } else { - UCNavigationController *navigation([[[UCNavigationController alloc] init] autorelease]); + UCNavigationController *navigation([[[UCNavigationController alloc] initWithRootViewController:page] autorelease]); [navigation setHook:indirect_]; [navigation setDelegate:delegate_]; - [navigation setViewControllers:[NSArray arrayWithObject:page]]; - [[page navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithTitle:UCLocalize("CLOSE") style:UIBarButtonItemStylePlain diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm index 4a8ea5d..3e6e692 100644 --- a/UICaboodle/RVPage.mm +++ b/UICaboodle/RVPage.mm @@ -5,17 +5,15 @@ #import "RVBook.h" +extern bool IsWildcat_; + @implementation CYViewController -- (void)setDelegate:(id)delegate { +- (void) setDelegate:(id)delegate { delegate_ = delegate; } - (void) reloadData { } -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { - if ([self parentViewController]) { - return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation]; - } else { - return [super shouldAutorotateToInterfaceOrientation:orientation]; - } +- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { + return IsWildcat_ || orientation == UIInterfaceOrientationPortrait; } @end |