Notify javascript when download status changes. Allow js to query information about a download.
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
@implementation Controller
|
||||
@synthesize allMods;
|
||||
@synthesize webView;
|
||||
- (void) awakeFromNib
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
game = [[GameInstall alloc] initWithURL:[NSURL URLWithString:@"/Users/paul/src/OpenRA"]];
|
||||
[[JSBridge sharedInstance] setController:self];
|
||||
@@ -101,7 +102,6 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
Download *download = [Download downloadWithURL:url filename:path key:key game:game];
|
||||
[downloads setObject:download forKey:key];
|
||||
return YES;
|
||||
@@ -113,6 +113,11 @@
|
||||
[downloads removeObjectForKey:key];
|
||||
}
|
||||
|
||||
- (Download *)downloadWithKey:(NSString *)key
|
||||
{
|
||||
return [downloads objectForKey:key];
|
||||
}
|
||||
|
||||
#pragma mark Sidebar Datasource and Delegate
|
||||
- (int)outlineView:(NSOutlineView *)anOutlineView numberOfChildrenOfItem:(id)item
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user