diff options
author | Kevin Walzer <kw@codebykevin.com> | 2018-03-05 03:57:50 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2018-03-05 03:57:50 (GMT) |
commit | 2e9a2e3e4e7a84da6733dd78fa579dd7b7be6292 (patch) | |
tree | f7964ee628a5c03574c71e8afea81b1895214b28 | |
parent | 6cec0cc76e0280301d5f58e11677a56f04eaf5ef (diff) | |
download | tk-2e9a2e3e4e7a84da6733dd78fa579dd7b7be6292.zip tk-2e9a2e3e4e7a84da6733dd78fa579dd7b7be6292.tar.gz tk-2e9a2e3e4e7a84da6733dd78fa579dd7b7be6292.tar.bz2 |
Begin refinements of code
-rw-r--r-- | macosx/tkMacOSXServices.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c index 9e78c56..9140486 100644 --- a/macosx/tkMacOSXServices.c +++ b/macosx/tkMacOSXServices.c @@ -154,13 +154,12 @@ int ServicesEventProc(Tcl_Event *event, int flags) { @end -//register a specific widget to access the Services menu +/* Register a specific widget to access the Services menu. */ int RegisterServiceWidget (ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv[]) { - //set up an autorelease pool NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - //need proper number of args + /* Need proper number of args. */ if(objc != 2) { Tcl_WrongNumArgs(ip, 1, objv, "path?"); return TCL_ERROR; @@ -179,8 +178,8 @@ int RegisterServiceWidget (ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CON Tk_MapWindow(path); Drawable d = Tk_WindowId(path); - //get NSView from Tk window and add subview - TclService *serviceview = [[TclService alloc] init]; + /* Get NSView from Tk window and add subview. */ + TkService *serviceview = [[TkService alloc] init]; NSView *view = TkMacOSXGetRootControl(d); if ([serviceview superview] != view) { [view addSubview:serviceview]; @@ -188,7 +187,7 @@ int RegisterServiceWidget (ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CON TkMacOSXWinBounds((TkWindow*)path, &bounds); - //hack to make sure subview is set to take up entire geometry of window + /* Hack to make sure subview is set to take up entire geometry of window. */ frame = NSMakeRect(bounds.left, bounds.top, 100000, 100000); frame.origin.y = 0; |