- (void) showSettings;
- (UIProgressHUD *) addProgressHUD;
- (void) removeProgressHUD:(UIProgressHUD *)hud;
-- (UCViewController *) pageForPackage:(NSString *)name;
+- (CYViewController *) pageForPackage:(NSString *)name;
- (PackageController *) packageController;
- (void) showActionSheet:(UIActionSheet *)sheet fromItem:(UIBarButtonItem *)item;
@end
@end
/* }}} */
-/* Cydia View Controller {{{ */
-@interface CYViewController : UCViewController { }
-@end
-
-@implementation CYViewController
-@end
-/* }}} */
/* Cydia Browser Controller {{{ */
@interface CYBrowserController : BrowserController {
CydiaObject *cydia_;
bool loaded_;
}
-- (UCViewController *) _pageForURL:(NSURL *)url withClass:(Class)_class;
-- (void) setPage:(UCViewController *)page;
+- (CYViewController *) _pageForURL:(NSURL *)url withClass:(Class)_class;
+- (void) setPage:(CYViewController *)page;
- (void) loadData;
@end
[self complete];
}
-- (void) setPage:(UCViewController *)page {
+- (void) setPage:(CYViewController *)page {
[page setDelegate:self];
CYNavigationController *navController = (CYNavigationController *) [tabbar_ selectedViewController];
}
}
-- (UCViewController *) _pageForURL:(NSURL *)url withClass:(Class)_class {
+- (CYViewController *) _pageForURL:(NSURL *)url withClass:(Class)_class {
CYBrowserController *browser = [[[_class alloc] init] autorelease];
[browser loadURL:url];
return browser;
[window_ setUserInteractionEnabled:YES];
}
-- (UCViewController *) pageForPackage:(NSString *)name {
+- (CYViewController *) pageForPackage:(NSString *)name {
if (Package *package = [database_ packageWithName:name]) {
PackageController *view([self packageController]);
[view setPackage:package];
}
}
-- (UCViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag {
+- (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag {
if (tag != NULL)
*tag = -1;
- (void) applicationOpenURL:(NSURL *)url {
[super applicationOpenURL:url];
int tag;
- if (UCViewController *page = [self pageForURL:url hasTag:&tag]) {
+ if (CYViewController *page = [self pageForURL:url hasTag:&tag]) {
[self setPage:page];
tag_ = tag;
[tabbar_ setSelectedViewController:(tag_ == -1 ? nil : [[tabbar_ viewControllers] objectAtIndex:tag_])];
[self view:sender didSetFrame:frame];
}
-- (void) pushPage:(UCViewController *)page {
+- (void) pushPage:(CYViewController *)page {
[page setDelegate:delegate_];
[[self navigationItem] setTitle:title_];
[[self navigationController] pushViewController:page animated:YES];
[[self navigationController] pushViewController:self animated:YES];
}
-- (void) swapPage:(UCViewController *)page {
+- (void) swapPage:(CYViewController *)page {
[page setDelegate:delegate_];
if (pushed_) [[self navigationController] popViewControllerAnimated:NO];
NSLog(@"getSpecial:%@", url);
#endif
- if (UCViewController *page = [delegate_ pageForURL:url hasTag:NULL]) {
+ if (CYViewController *page = [delegate_ pageForURL:url hasTag:NULL]) {
if (swap)
[self swapPage:page];
else
UCNavigationController *navigation([[[UCNavigationController alloc] init] autorelease]);
[navigation setHook:indirect_];
- UCViewController *page([delegate_ pageForURL:url hasTag:NULL]);
+ CYViewController *page([delegate_ pageForURL:url hasTag:NULL]);
if (page == nil) {
/* XXX: call createWebViewWithRequest instead? */