]> git.saurik.com Git - cydia.git/commitdiff
Allow window.close() to close unselected controllers.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 14 Mar 2011 09:01:21 +0000 (02:01 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 14 Mar 2011 12:09:10 +0000 (05:09 -0700)
CyteKit/WebViewController.mm
MobileCydia.mm

index 2d9cfe18a8dd684c21420ad28a80d44bab707b8d..4b2116f3f01da29709a6b1462a280d77c21c42da 100644 (file)
@@ -581,7 +581,7 @@ float CYScrollViewDecelerationRateNormal;
 // }}}
 
 - (void) close {
 // }}}
 
 - (void) close {
-    [[self navigationController] dismissModalViewControllerAnimated:YES];
+    [[[self navigationController] parentViewController] dismissModalViewControllerAnimated:YES];
 }
 
 - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button {
 }
 
 - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button {
index d6bea29f743f895940fa8946ceb266b6a1e4bd76..92f5a0aec2a0d64cbd18fab419608be636def17b 100644 (file)
@@ -6763,6 +6763,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     return items;
 }
 
     return items;
 }
 
+- (void) dismissModalViewControllerAnimated:(BOOL)animated {
+    if ([self modalViewController] == nil && [self unselectedViewController] != nil)
+        [self setUnselectedViewController:nil];
+    else
+        [super dismissModalViewControllerAnimated:YES];
+}
+
 - (void) unloadData {
     [super unloadData];
 
 - (void) unloadData {
     [super unloadData];