]> git.saurik.com Git - cydia.git/blobdiff - MobileCydia.mm
Add -[CyteWebViewDelegate webView:didCommitLoadForFrame:].
[cydia.git] / MobileCydia.mm
index 43217de937801be22e31475d14c7a79f19eed071..92f5a0aec2a0d64cbd18fab419608be636def17b 100644 (file)
@@ -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_];
 }