diff options
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index c2b1b15..b7475e2 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -647,6 +647,7 @@ Tk_GetOpenFileObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; + TkWindow *winPtr = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len, multiple = 0; @@ -818,7 +819,7 @@ Tk_GetOpenFileObjCmd( [openpanel setDirectoryURL:fileURL]; } if (haveParentOption) { - parent = TkMacOSXGetNSWindowForDrawable(((TkWindow *)tkwin)->window); + parent = TkMacOSXGetNSWindowForDrawable(winPtr->window); parentIsKey = parent && [parent isKeyWindow]; } else { parent = nil; @@ -918,6 +919,7 @@ Tk_GetSaveFileObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = (Tk_Window)clientData; + TkWindow *winPtr = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int confirmOverwrite = 1; @@ -1104,7 +1106,7 @@ Tk_GetSaveFileObjCmd( [savepanel setNameFieldStringValue:@""]; } if (haveParentOption) { - parent = TkMacOSXGetNSWindowForDrawable(((TkWindow *)tkwin)->window); + parent = TkMacOSXGetNSWindowForDrawable(winPtr->window); parentIsKey = parent && [parent isKeyWindow]; } else { parent = nil; @@ -1160,6 +1162,7 @@ Tk_ChooseDirectoryObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = (Tk_Window)clientData; + TkWindow *winPtr = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len, mustexist = 0; @@ -1246,10 +1249,10 @@ Tk_ChooseDirectoryObjCmd( if (!directory) { directory = @"/"; } - parent = TkMacOSXGetNSWindowForDrawable(((TkWindow *)tkwin)->window); + parent = TkMacOSXGetNSWindowForDrawable(winPtr->window); [panel setDirectoryURL:[NSURL fileURLWithPath:directory isDirectory:YES]]; if (haveParentOption) { - parent = TkMacOSXGetNSWindowForDrawable(((TkWindow *)tkwin)->window); + parent = TkMacOSXGetNSWindowForDrawable(winPtr->window); parentIsKey = parent && [parent isKeyWindow]; } else { parent = nil; |