diff options
author | Kevin Walzer <kw@codebykevin.com> | 2018-03-08 04:49:26 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2018-03-08 04:49:26 (GMT) |
commit | de1ff8a96a6e8b7062a957612362264509b16228 (patch) | |
tree | 5980b13356fa0d81faf985715e0b8a7881844476 /macosx/tkMacOSXServices.c | |
parent | 944d9408c03d817d09269f21055d5d40e7759ab4 (diff) | |
download | tk-de1ff8a96a6e8b7062a957612362264509b16228.zip tk-de1ff8a96a6e8b7062a957612362264509b16228.tar.gz tk-de1ff8a96a6e8b7062a957612362264509b16228.tar.bz2 |
Implementation and documentation complete, now ready to be submitted as TIP
Diffstat (limited to 'macosx/tkMacOSXServices.c')
-rw-r--r-- | macosx/tkMacOSXServices.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c index cc4d282..6709eca 100644 --- a/macosx/tkMacOSXServices.c +++ b/macosx/tkMacOSXServices.c @@ -58,9 +58,7 @@ int ServicesEventProc(Tcl_Event *event, int flags) { + (void) initialize { NSArray *sendTypes = [NSArray arrayWithObjects:NSStringPboardType, nil]; - NSArray *returnTypes = [NSArray arrayWithObjects:NSStringPboardType, - nil]; - [NSApp registerServicesMenuSendTypes:sendTypes returnTypes:returnTypes]; + [NSApp registerServicesMenuSendTypes:sendTypes returnTypes:nil]; NSUpdateDynamicServices(); return; } @@ -141,15 +139,6 @@ int ServicesEventProc(Tcl_Event *event, int flags) { event->header.proc = ServicesEventProc; strcpy(event->script, "::tk::mac::PerformService"); Tcl_QueueEvent((Tcl_Event *)event, TCL_QUEUE_TAIL); - - /* Get output from service proc, return to interp, and write to pasteboard. */ - char *output; - output = Tcl_GetString(Tcl_GetObjResult(ServicesInterp)); - Tcl_SetResult(ServicesInterp, output, NULL); - NSString *serviceOutput = [NSString stringWithUTF8String:output]; - [pboard clearContents]; - [pboard writeObjects:[NSArray arrayWithObject:serviceOutput]]; - } else { return; } |