diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-07 22:00:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-07 22:00:15 (GMT) |
commit | 8acb512c92c1b619073eac7d604ab9791ef0e713 (patch) | |
tree | 3e9691c13e240731e5cf78e7e27ff536d68a4bab /macosx/tkMacOSXDialog.c | |
parent | 90b1090817bbf37d8787cc9ed77f2a4ca7460bb7 (diff) | |
parent | 2d8d71bb9e77b74a29295db7280e8383c4ac4df0 (diff) | |
download | tk-8acb512c92c1b619073eac7d604ab9791ef0e713.zip tk-8acb512c92c1b619073eac7d604ab9791ef0e713.tar.gz tk-8acb512c92c1b619073eac7d604ab9791ef0e713.tar.bz2 |
Merge trunk
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index ad952e8..a149bca 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -16,13 +16,6 @@ #include "tkFileFilter.h" #include "tkMacOSXConstants.h" -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 -#define modalOK NSOKButton -#define modalCancel NSCancelButton -#else -#define modalOK NSModalResponseOK -#define modalCancel NSModalResponseCancel -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < 1090 #define modalOther -1 #define modalError -2 @@ -202,7 +195,7 @@ getFileURL( { FilePanelCallbackInfo *callbackInfo = contextInfo; - if (returnCode == modalOK) { + if (returnCode == NSModalResponseOK) { Tcl_Obj *resultObj; if (callbackInfo->multiple) { @@ -230,7 +223,7 @@ getFileURL( } else { Tcl_SetObjResult(callbackInfo->interp, resultObj); } - } else if (returnCode == modalCancel) { + } else if (returnCode == NSModalResponseCancel) { Tcl_ResetResult(callbackInfo->interp); } if (panel == [NSApp modalWindow]) { @@ -411,7 +404,7 @@ Tk_ChooseColorObjCmd( [colorPanel setColor:initialColor]; } returnCode = [NSApp runModalForWindow:colorPanel]; - if (returnCode == modalOK) { + if (returnCode == NSModalResponseOK) { color = [[colorPanel color] colorUsingColorSpace: [NSColorSpace deviceRGBColorSpace]]; numberOfComponents = [color numberOfComponents]; @@ -810,7 +803,7 @@ Tk_GetOpenFileObjCmd( [parent makeKeyWindow]; } - if ((typeVariablePtr && (modalReturnCode == NSOKButton)) + if ((typeVariablePtr && (modalReturnCode == NSModalResponseOK)) && filterInfo.doFileTypes) { /* * The -typevariable must be set to the selected file type, if the @@ -1122,7 +1115,7 @@ Tk_GetSaveFileObjCmd( [parent makeKeyWindow]; } - if (typeVariablePtr && (modalReturnCode == NSOKButton) + if (typeVariablePtr && (modalReturnCode == NSModalResponseOK) && filterInfo.doFileTypes) { /* * The -typevariable must be set to the selected file type, if the |