1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-28 10:38:45 +00:00

#2787 allow dragging of URLs onto the dock icon once again

This commit is contained in:
Mitchell Livingston 2010-01-23 00:05:40 +00:00
parent 7f236280ae
commit 312339d3c2

View file

@ -345,14 +345,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
tr_sessionSetRPCCallback(fLib, rpcCallback, self); tr_sessionSetRPCCallback(fLib, rpcCallback, self);
//register for dock icon drags
[[NSAppleEventManager sharedAppleEventManager] setEventHandler: self andSelector: @selector(handleOpenContentsEvent:replyEvent:)
forEventClass: kCoreEventClass andEventID: kAEOpenContents];
//register for magnet URLs
[[NSAppleEventManager sharedAppleEventManager] setEventHandler: self andSelector: @selector(handleOpenContentsEvent:replyEvent:)
forEventClass: kInternetEventClass andEventID: kAEGetURL];
[GrowlApplicationBridge setGrowlDelegate: self]; [GrowlApplicationBridge setGrowlDelegate: self];
[[UKKQueue sharedFileWatcher] setDelegate: self]; [[UKKQueue sharedFileWatcher] setDelegate: self];
@ -578,6 +570,14 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
{ {
[NSApp setServicesProvider: self]; [NSApp setServicesProvider: self];
//register for dock icon drags (has to be in applicationDidFinishLaunching: to work)
[[NSAppleEventManager sharedAppleEventManager] setEventHandler: self andSelector: @selector(handleOpenContentsEvent:replyEvent:)
forEventClass: kCoreEventClass andEventID: kAEOpenContents];
//register for magnet URLs
[[NSAppleEventManager sharedAppleEventManager] setEventHandler: self andSelector: @selector(handleOpenContentsEvent:replyEvent:)
forEventClass: kInternetEventClass andEventID: kAEGetURL];
//auto importing //auto importing
[self checkAutoImportDirectory]; [self checkAutoImportDirectory];