summaryrefslogtreecommitdiff
path: root/indra/newview/llappdelegate-objc.mm
diff options
context:
space:
mode:
authorGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-09-26 18:53:12 -0700
committerGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-09-26 18:53:12 -0700
commit4bc93932401353efda75f51694edd65f4b187fe0 (patch)
tree2f86a6d8571eded97bb40bd6ef8e8c66ab47cc1c /indra/newview/llappdelegate-objc.mm
parentbadb8a945d31aed6f396e7efb521e76083870069 (diff)
MAINT-3155 add cocoa equiv for former AppleEventManager shenanigans for SLURL handling
Diffstat (limited to 'indra/newview/llappdelegate-objc.mm')
-rw-r--r--indra/newview/llappdelegate-objc.mm13
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