]> git.saurik.com Git - cydia.git/blobdiff - UICaboodle/BrowserView.mm
Reallocate ChangesController::packages_ in _reloadPackages: instead of clearing in...
[cydia.git] / UICaboodle / BrowserView.mm
index f1053f85e65f5c5fa76185f6c4900ca510adb104..1017496e4e15a2f6c35b276633f7ef67cad00985 100644 (file)
@@ -837,19 +837,13 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
 
         [alert dismissWithClickedButtonIndex:-1 animated:YES];
     } else if ([context isEqualToString:@"submit"]) {
-        switch (button) {
-            case 1:
-            break;
-
-            case 2:
-                if (request_ != nil) {
-                    WebThreadLock();
-                    [webview_ loadRequest:request_];
-                    WebThreadUnlock();
-                }
-            break;
-
-            _nodefault
+        if (button == [alert cancelButtonIndex]) {
+        } else if (button == [alert firstOtherButtonIndex]) {
+            if (request_ != nil) {
+                WebThreadLock();
+                [webview_ loadRequest:request_];
+                WebThreadUnlock();
+            }
         }
 
         [alert dismissWithClickedButtonIndex:-1 animated:YES];
@@ -904,24 +898,33 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
     }
 }
 
+- (void) didStartLoading {
+    // Overridden in subclasses.
+}
+
 - (void) _didStartLoading {
     [self applyRightButton];
 
     if ([loading_ count] != 1)
         return;
+
     [delegate_ retainNetworkActivityIndicator];
+    [self didStartLoading];
+}
+
+- (void) didFinishLoading {
+    // Overridden in subclasses.
 }
 
 - (void) _didFinishLoading {
     if ([loading_ count] != 0)
         return;
-    [delegate_ releaseNetworkActivityIndicator];
 
     [self applyRightButton];
+    [[self navigationItem] setTitle:title_];
 
-    // XXX: wtf?
-    if (![self isLoading])
-        [[self navigationItem] setTitle:title_];
+    [delegate_ releaseNetworkActivityIndicator];
+    [self didFinishLoading];
 }
 
 - (bool) isLoading {