summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXDialog.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index a5138ad..23b3de5 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -33,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",
@@ -534,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;
@@ -613,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) {