diff options
author | Kevin Walzer <kw@codebykevin.com> | 2014-11-18 14:46:46 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2014-11-18 14:46:46 (GMT) |
commit | a3284c836bae48f2fcb6dd27ede98526a4e53fd0 (patch) | |
tree | 0abc8b043398f96c58d8c121f612826785a992be /macosx/tkMacOSXEmbed.c | |
parent | bf8a23719fe88a38618840973f093d214ec93243 (diff) | |
download | tk-a3284c836bae48f2fcb6dd27ede98526a4e53fd0.zip tk-a3284c836bae48f2fcb6dd27ede98526a4e53fd0.tar.gz tk-a3284c836bae48f2fcb6dd27ede98526a4e53fd0.tar.bz2 |
Remove residual private API calls from Tk/Mac after Mac App Store review flagged them as being present.
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 1d66b82..f9700f6 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -207,6 +207,7 @@ TkpUseWindow( MacDrawable *parent, *macWin; Container *containerPtr; + if (winPtr->window != None) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't modify container after widget is created", -1)); @@ -247,14 +248,14 @@ TkpUseWindow( * Container structure, since we only allow the case where both container * and embedded app. are in the same process. */ - + for (containerPtr = firstContainerPtr; containerPtr != NULL; - containerPtr = containerPtr->nextPtr) { - if (containerPtr->parent == (Window) parent) { - winPtr->flags |= TK_BOTH_HALVES; - containerPtr->parentPtr->flags |= TK_BOTH_HALVES; - break; - } + containerPtr = containerPtr->nextPtr) { + if (containerPtr->parent == (Window) parent) { + winPtr->flags |= TK_BOTH_HALVES; + containerPtr->parentPtr->flags |= TK_BOTH_HALVES; + break; + } } /* @@ -313,9 +314,10 @@ TkpUseWindow( if (tkMacOSXEmbedHandler == NULL || tkMacOSXEmbedHandler->registerWinProc((long) parent, (Tk_Window) winPtr) != TCL_OK) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "The window ID %s does not correspond to a valid Tk Window", - string)); + "The window ID %s does not correspond to a valid Tk Window", + string)); Tcl_SetErrorCode(interp, "TK", "EMBED", "HANDLE", NULL); return TCL_ERROR; } @@ -391,7 +393,6 @@ TkpMakeContainer( * sure the argument to -use is valid. */ - Tk_MakeWindowExist(tkwin); containerPtr = ckalloc(sizeof(Container)); containerPtr->parent = Tk_WindowId(tkwin); containerPtr->parentPtr = winPtr; |