adium 3285:8af6e19b791a: Added support for opening links in the ...

commits at adium.im commits at adium.im
Tue Sep 7 13:22:04 UTC 2010


details:	http://hg.adium.im/adium/rev/8af6e19b791a
revision:	3285:8af6e19b791a
author:		Aaron Dodson <gonfunko at mac.com>
date:		Tue Sep 07 08:28:40 2010 -0400

Added support for opening links in the background

diffs (30 lines):

diff -r 65ad4d8acd5d -r 8af6e19b791a Plugins/WebKit Message View/AIWebKitDelegate.m
--- a/Plugins/WebKit Message View/AIWebKitDelegate.m	Tue Sep 07 15:06:19 2010 +0200
+++ b/Plugins/WebKit Message View/AIWebKitDelegate.m	Tue Sep 07 08:28:40 2010 -0400
@@ -9,6 +9,7 @@
 #import "AIWebKitMessageViewController.h"
 #import "ESWebView.h"
 #import "AIURLHandlerPlugin.h"
+#import "AIEventAdditions.h"
 
 static AIWebKitDelegate *AISharedWebKitDelegate;
 
@@ -106,7 +107,17 @@
 		
 		//Ignore file URLs, but open anything else
 		if (![url isFileURL]) {
-			[[NSWorkspace sharedWorkspace] openURL:url];
+			if ([NSEvent cmdKey]) {
+				NSArray *urls = [NSArray arrayWithObject:url]; 
+				
+				[[NSWorkspace sharedWorkspace] openURLs:urls
+								withAppBundleIdentifier:nil
+												options:NSWorkspaceLaunchWithoutActivation
+						 additionalEventParamDescriptor:nil 
+									  launchIdentifiers:nil];
+			} else {
+				[[NSWorkspace sharedWorkspace] openURL:url]; 
+			}
 		}
 		
 		[listener ignore];




More information about the commits mailing list