From 188d13f2e3531f9b02ee369306d8200d15fe1b34 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Fri, 26 Sep 2008 00:23:32 +0200 Subject: [PATCH] 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. --- PBWebGitController.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PBWebGitController.m b/PBWebGitController.m index b61556f..cd09eb3 100644 --- a/PBWebGitController.m +++ b/PBWebGitController.m @@ -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