summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-02 03:33:09 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-02 03:48:55 -0800
commit540437033286aa962b940cefac84686abf6d9ffa (patch)
tree2c29082de260d6676ec09a955cbeb0c80b764ef5 /UICaboodle
parent61cc8460c4bb3c19180732df2006a63a9b62680b (diff)
Use UIApplication::networkActivityIndicator to indicate network activity.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.h2
-rw-r--r--UICaboodle/BrowserView.mm7
2 files changed, 9 insertions, 0 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h
index f5d5029..f224326 100644
--- a/UICaboodle/BrowserView.h
+++ b/UICaboodle/BrowserView.h
@@ -50,6 +50,8 @@
@end
@protocol BrowserControllerDelegate
+- (void) retainNetworkActivityIndicator;
+- (void) releaseNetworkActivityIndicator;
- (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag;
@end
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 5fd65c2..f1053f8 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -451,6 +451,8 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
if (title_ != nil)
[title_ release];
+ if ([loading_ count] != 0)
+ [delegate_ releaseNetworkActivityIndicator];
[loading_ release];
[reloaditem_ release];
@@ -904,11 +906,16 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
- (void) _didStartLoading {
[self applyRightButton];
+
+ if ([loading_ count] != 1)
+ return;
+ [delegate_ retainNetworkActivityIndicator];
}
- (void) _didFinishLoading {
if ([loading_ count] != 0)
return;
+ [delegate_ releaseNetworkActivityIndicator];
[self applyRightButton];