summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-02-02 00:30:38 -0800
committerGrant Paul <chpwn@chpwn.com>2011-02-02 00:30:38 -0800
commit0c1cb67a559b2077dddedf7eab3251a3e4cc0812 (patch)
treeef05d6a9fb2790321c054188fbd6ab517229530b
parent3f8edf70826f85ab3f0c5b47c4ab2a586068b43a (diff)
Workaround to fix the Settings Controller popup on initial launch.
-rw-r--r--MobileCydia.mm17
1 files 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];