mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
WebController: Move common functions to superclass
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:file]];
|
||||
|
||||
finishedLoading = NO;
|
||||
[view setUIDelegate:self];
|
||||
[view setFrameLoadDelegate:self];
|
||||
[[view mainFrame] loadRequest:request];
|
||||
}
|
||||
|
||||
@@ -32,4 +34,24 @@
|
||||
[self performSelector:@selector(didLoad)];
|
||||
}
|
||||
|
||||
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)dictionary
|
||||
{
|
||||
NSLog(@"Error from webkit!");
|
||||
}
|
||||
|
||||
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (BOOL)isKeyExcludedFromWebScript:(const char *)name {
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark Functions to be used from JavaScript
|
||||
- (void) log: (NSString*) logMessage
|
||||
{
|
||||
NSLog(logMessage);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -62,11 +62,6 @@
|
||||
[script callWebScriptMethod:@"loadCommit" withArguments: nil];
|
||||
}
|
||||
|
||||
- (void) log: (NSString*) logMessage
|
||||
{
|
||||
NSLog(logMessage);
|
||||
}
|
||||
|
||||
- (void) selectCommit: (NSString*) sha
|
||||
{
|
||||
[historyController selectCommit:sha];
|
||||
@@ -86,15 +81,6 @@
|
||||
[a setString:source forType: NSStringPboardType];
|
||||
}
|
||||
|
||||
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (BOOL)isKeyExcludedFromWebScript:(const char *)name {
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) removeRef:(RefMenuItem *)sender
|
||||
{
|
||||
NSLog(@"Removing ref: %@", [sender ref]);
|
||||
|
||||
Reference in New Issue
Block a user