X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/25c1dafb7565aea86bec1f415896e4ad1431906b..64ffa33263f912a9747b9716f04e9cdcb0b857a9:/MobileCydia.mm diff --git a/MobileCydia.mm b/MobileCydia.mm index 43217de9..92f5a0ae 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6763,6 +6763,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { return items; } +- (void) dismissModalViewControllerAnimated:(BOOL)animated { + if ([self modalViewController] == nil && [self unselectedViewController] != nil) + [self setUnselectedViewController:nil]; + else + [super dismissModalViewControllerAnimated:YES]; +} + - (void) unloadData { [super unloadData]; @@ -8276,12 +8283,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [delegate_ removeProgressHUD:hud_]; hud_ = nil; - bool defer(false); - if (cydia_) { if (NSString *warning = [self yieldToSelector:@selector(getWarning)]) { - defer = true; - UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:UCLocalize("SOURCE_WARNING") message:warning @@ -8295,8 +8298,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [alert setContext:@"warning"]; [alert setNumberOfRows:1]; [alert show]; - } else - [self complete]; + + // XXX: there used to be this great mechanism called yieldToPopup... who deleted it? + error_ = nil; + return; + } + + [self complete]; } else if (error_ != nil) { UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:UCLocalize("VERIFICATION_ERROR") @@ -8584,6 +8592,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { UCLocalize("DEVELOPER"), nil]; segment_ = [[[UISegmentedControl alloc] initWithItems:items] autorelease]; + [segment_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin)]; container_ = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [[self view] frame].size.width, 44.0f)] autorelease]; [container_ addSubview:segment_]; }