mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add support for an old type of Apple event so that preview from Dreamweaver (<= CS4) works again. b=549680 r=josh
This commit is contained in:
parent
fa2294d8b4
commit
34bc3d456b
@ -112,10 +112,17 @@ SetupMacApplicationDelegate()
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
if ((self = [super init])) {
|
||||
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self
|
||||
andSelector:@selector(handleAppleEvent:withReplyEvent:)
|
||||
forEventClass:kInternetEventClass
|
||||
andEventID:kAEGetURL];
|
||||
NSAppleEventManager *aeMgr = [NSAppleEventManager sharedAppleEventManager];
|
||||
|
||||
[aeMgr setEventHandler:self
|
||||
andSelector:@selector(handleAppleEvent:withReplyEvent:)
|
||||
forEventClass:kInternetEventClass
|
||||
andEventID:kAEGetURL];
|
||||
|
||||
[aeMgr setEventHandler:self
|
||||
andSelector:@selector(handleAppleEvent:withReplyEvent:)
|
||||
forEventClass:'WWW!'
|
||||
andEventID:'OURL'];
|
||||
}
|
||||
return self;
|
||||
|
||||
@ -126,7 +133,9 @@ SetupMacApplicationDelegate()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
[[NSAppleEventManager sharedAppleEventManager] removeEventHandlerForEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||
NSAppleEventManager *aeMgr = [NSAppleEventManager sharedAppleEventManager];
|
||||
[aeMgr removeEventHandlerForEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||
[aeMgr removeEventHandlerForEventClass:'WWW!' andEventID:'OURL'];
|
||||
[super dealloc];
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
@ -364,7 +373,8 @@ static NSWindow* GetCocoaWindowForXULWindow(nsISupports *aXULWindow)
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
if ([event eventClass] == kInternetEventClass && [event eventID] == kAEGetURL) {
|
||||
if (([event eventClass] == kInternetEventClass && [event eventID] == kAEGetURL) ||
|
||||
([event eventClass] == 'WWW!' && [event eventID] == 'OURL')) {
|
||||
NSString* urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
|
||||
|
||||
// don't open chrome URLs
|
||||
|
Loading…
Reference in New Issue
Block a user