diff options
author | Grant Paul <chpwn@chpwn.com> | 2011-01-22 22:35:52 -0800 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2011-01-22 22:35:52 -0800 |
commit | c713af59c5ade19907804670a8c98381124aca6d (patch) | |
tree | eaef5746619433e26ba9207c5750df8518237a55 /MobileCydia.mm | |
parent | 8bacb67f37c8d04eb614fd1bb401bd489cb8253f (diff) |
Finish cydia:// URLs using the private "transient view controller" methods on UITabBarController. This allows for no tab to appear selected when on a page using a cydia:// URL.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index dd2a6ff..7a7a6a7 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6226,6 +6226,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CYNavigationController *page([[self viewControllers] objectAtIndex:(count - i - 1)]); [page reloadData]; } + + [(CYNavigationController *) [self transientViewController] reloadData]; } - (id) initWithDatabase:(Database *)database { @@ -8221,7 +8223,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { bool loaded_; } -- (void) setPage:(CYViewController *)page; - (void) loadData; @end @@ -8563,13 +8564,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [self complete]; } -- (void) setPage:(CYViewController *)page { - [page setDelegate:self]; - - CYNavigationController *navController = (CYNavigationController *) [tabbar_ selectedViewController]; - [navController setViewControllers:[NSArray arrayWithObject:page]]; -} - - (void) tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { CYNavigationController *controller = (CYNavigationController *) viewController; @@ -8879,8 +8873,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (BOOL) openCydiaURL:(NSURL *)url { CYViewController *page([self pageForURL:url]); - if (page != nil) - [self setPage:page]; + if (page != nil) { + CYNavigationController *nav = [[[CYNavigationController alloc] init] autorelease]; + [nav setViewControllers:[NSArray arrayWithObject:page]]; + [tabbar_ setTransientViewController:nav]; + } return page != nil; } |