mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
WebGitController: Add a policy to open links in browser
This was supposed to accompany the "Add gistie" commit, but somehow I forgot. Without this, links to be opened in new windows would not function.
This commit is contained in:
@@ -129,4 +129,13 @@
|
||||
|
||||
return defaultMenuItems;
|
||||
}
|
||||
|
||||
- (void)webView:(WebView *)sender decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
|
||||
request:(NSURLRequest *)request
|
||||
newFrameName:(NSString *)frameName
|
||||
decisionListener:(id < WebPolicyDecisionListener >)listener
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[request URL]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user