From 4a3efc2910d7a97ce44a619a10cc08d4b26ac815 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Fri, 26 Nov 2010 15:08:50 -0800 Subject: [PATCH] Remove keyboard_ (unused), add starturl_, and fix cydia:// URLs. --- MobileCydia.mm | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index ee5e006d..642c9e12 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7892,9 +7892,8 @@ typedef enum { Database *database_; int tag_; - - UIKeyboard *keyboard_; int huds_; + NSURL *starturl_; SectionsController *sections_; ChangesController *changes_; @@ -8566,12 +8565,7 @@ static _finline void _setHomePage(Cydia *self) { - (void) applicationOpenURL:(NSURL *)url { [super applicationOpenURL:url]; - int tag; - if (CYViewController *page = [self pageForURL:url hasTag:&tag]) { - [self setPage:page]; - tag_ = tag; - [tabbar_ setSelectedViewController:(tag_ == -1 ? nil : [[tabbar_ viewControllers] objectAtIndex:tag_])]; - } + starturl_ = [url retain]; } - (void) applicationWillResignActive:(UIApplication *)application { @@ -8752,9 +8746,19 @@ _trace(); [self reloadData]; PrintTimes(); - // Show the home page - [tabbar_ setSelectedIndex:0]; - _setHomePage(self); + // Show the initial page + CYViewController *page = nil; + int tag = 0; + if (starturl_ != nil && (page = [self pageForURL:starturl_ hasTag:&tag])) { + [starturl_ release]; + [self setPage:page]; + tag_ = tag; + [tabbar_ setSelectedViewController:(tag_ == -1 ? nil : [[tabbar_ viewControllers] objectAtIndex:tag_])]; + } else { + [tabbar_ setSelectedIndex:0]; + _setHomePage(self); + } + [window_ setUserInteractionEnabled:YES]; // XXX: does this actually slow anything down? -- 2.45.2