diff options
author | Baker Linden <baker@lindenlab.com> | 2013-12-18 18:25:47 -0500 |
---|---|---|
committer | Baker Linden <baker@lindenlab.com> | 2013-12-18 18:25:47 -0500 |
commit | 3c521d8207092f1c48e158082b88c5e81cc9c440 (patch) | |
tree | 36a18cfaed8fc4e3ee2a84604f3876832522e529 /indra/newview/llappdelegate-objc.mm | |
parent | 74707f0057c05dc4dd439302e64fe29e8ed91a32 (diff) | |
parent | 1a9b9f1bd1b5f64b35b9ce6eff458cdb7a79fe6e (diff) |
viewer-release merge
Diffstat (limited to 'indra/newview/llappdelegate-objc.mm')
-rw-r--r-- | indra/newview/llappdelegate-objc.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 30476b3d22..91251ed7c0 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -54,6 +54,19 @@ } [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil]; + + [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; +} + +- (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { + NSString *url= nil; + url = [[[[NSAppleEventManager sharedAppleEventManager]// 1 + currentAppleEvent]// 2 + paramDescriptorForKeyword:keyDirectObject]// 3 + stringValue];// 4 + + const char* url_utf8 = [url UTF8String]; + handleUrl(url_utf8); } - (void) applicationDidBecomeActive:(NSNotification *)notification |