diff options
author | pspjuth <peter.spjuth@gmail.com> | 2012-08-26 17:07:19 (GMT) |
---|---|---|
committer | pspjuth <peter.spjuth@gmail.com> | 2012-08-26 17:07:19 (GMT) |
commit | 2c2a2e6522dcfc11aaa8017b47bc14485313349b (patch) | |
tree | d0cf2a1e6e56525333957dd5fe2aab36bf174a4c /macosx/tkMacOSXDialog.c | |
parent | fc0e57edc8cb5ad99ea9540032237367f8b0a777 (diff) | |
parent | e4c7ef5bdf6375e1860418b1ec92c07f88660cc8 (diff) | |
download | tk-pspjuth_canvas.zip tk-pspjuth_canvas.tar.gz tk-pspjuth_canvas.tar.bz2 |
merge trunkpspjuth_canvas
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index e1f0fd8..23b3de5 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -9,8 +9,6 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.49 2010/06/15 12:40:07 nijtmans Exp $ */ #include "tkMacOSXPrivate.h" @@ -35,11 +33,13 @@ enum openOptions { }; static const char *const saveOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", - "-message", "-parent", "-title", "-typevariable", "-command", NULL + "-message", "-parent", "-title", "-typevariable", "-command", + "-confirmoverwrite", NULL }; enum saveOptions { SAVE_DEFAULT, SAVE_FILETYPES, SAVE_INITDIR, SAVE_INITFILE, SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE, SAVE_TYPEVARIABLE, SAVE_COMMAND, + SAVE_CONFIRMOW }; static const char *const chooseOptionStrings[] = { "-initialdir", "-message", "-mustexist", "-parent", "-title", "-command", @@ -536,6 +536,7 @@ Tk_GetSaveFileObjCmd( Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; + int confirmOverwrite = 1; int index, len; FileFilterList fl; Tcl_Obj *cmdObj = NULL; @@ -615,6 +616,12 @@ Tk_GetSaveFileObjCmd( case SAVE_COMMAND: cmdObj = objv[i+1]; break; + case SAVE_CONFIRMOW: + if (Tcl_GetBooleanFromObj(interp, objv[i + 1], + &confirmOverwrite) != TCL_OK) { + goto end; + } + break; } } if (fl.filters || defaultType) { |