From 0c1cb67a559b2077dddedf7eab3251a3e4cc0812 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Wed, 2 Feb 2011 00:30:38 -0800 Subject: Workaround to fix the Settings Controller popup on initial launch. --- MobileCydia.mm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 0c9634b..5a5afed 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8927,13 +8927,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [tabbar_ setUpdateDelegate:self]; } -- (void)showEmulatedLoadingControllerInView:(UIView *)view { +- (CYEmulatedLoadingController *)showEmulatedLoadingControllerInView:(UIView *)view { static CYEmulatedLoadingController *fake = [[CYEmulatedLoadingController alloc] init]; if (view != nil) { [view addSubview:[fake view]]; } else { [[fake view] removeFromSuperview]; } + + return fake; } - (void) applicationDidFinishLaunching:(id)unused { @@ -9000,8 +9002,19 @@ _trace(); - (void) loadData { _trace(); if (Role_ == nil) { - [self showSettings]; + [window_ setUserInteractionEnabled:YES]; + + SettingsController *role = [[[SettingsController alloc] initWithDatabase:database_ delegate:self] autorelease]; + CYNavigationController *nav = [[[CYNavigationController alloc] initWithRootViewController:role] autorelease]; + if (IsWildcat_) + [nav setModalPresentationStyle:UIModalPresentationFormSheet]; + [[self showEmulatedLoadingControllerInView:window_] presentModalViewController:nav animated:YES]; + return; + } else { + if ([[self showEmulatedLoadingControllerInView:window_] modalViewController] != nil) + [[self showEmulatedLoadingControllerInView:window_] dismissModalViewControllerAnimated:YES]; + [window_ setUserInteractionEnabled:NO]; } [self reloadData]; -- cgit v1.2.3