summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-11-26 15:08:50 -0800
committerGrant Paul <chpwn@chpwn.com>2010-11-26 15:08:58 -0800
commit23ea638cc495a04f9926f37817beffdd9caa0341 (patch)
tree8bc3fe39fb695bad1a92e0a89d87e1e5fd7f4be2
parent45211c6724e888d9baa3cc8217f46d42e5c2fa13 (diff)
Remove keyboard_ (unused), add starturl_, and fix cydia:// URLs.
-rw-r--r--MobileCydia.mm26
1 files changed, 15 insertions, 11 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index ee5e006..642c9e1 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?