summaryrefslogtreecommitdiff
path: root/UICaboodle/BrowserView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'UICaboodle/BrowserView.mm')
-rw-r--r--UICaboodle/BrowserView.mm24
1 files changed, 23 insertions, 1 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 2abc02e..c4e4b36 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -27,6 +27,7 @@ extern NSString * const kCAFilterNearest;
#include "substrate.h"
#define ForSaurik 0
+#define DefaultTimeout_ 120.0
template <typename Type_>
static inline void CYRelease(Type_ &value) {
@@ -463,11 +464,21 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
[super dealloc];
}
+- (void) setURL:(NSURL *)url {
+ _assert(request_ == nil);
+
+ request_ = [[NSURLRequest
+ requestWithURL:url
+ cachePolicy:NSURLRequestUseProtocolCachePolicy
+ timeoutInterval:DefaultTimeout_
+ ] retain];
+}
+
- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy {
[self loadRequest:[NSURLRequest
requestWithURL:url
cachePolicy:policy
- timeoutInterval:120.0
+ timeoutInterval:DefaultTimeout_
]];
}
@@ -507,6 +518,11 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
}
}
+- (void) reloadData {
+ [super reloadData];
+ [self reloadURL];
+}
+
- (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function {
if (custom_ != nil)
[custom_ autorelease];
@@ -1035,6 +1051,12 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
return [self initWithWidth:0];
}
+- (id) initWithURL:(NSURL *)url {
+ if ((self = [self init]) != nil) {
+ [self setURL:url];
+ } return self;
+}
+
- (void) didDismissModalViewController {
if (closer_ != nil)
[self callFunction:closer_];