summaryrefslogtreecommitdiffstats
path: root/win/tkWinDialog.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-04 12:33:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-04 12:33:23 (GMT)
commit65a269fcf2363cf08ce16e09eb22da3a67474820 (patch)
treedb14ace0d9937f7cc569e241d71d9b303a8e0aa5 /win/tkWinDialog.c
parent011f3123c085bb3512cc68548ad9246b0a31debf (diff)
parentfe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb (diff)
downloadtk-65a269fcf2363cf08ce16e09eb22da3a67474820.zip
tk-65a269fcf2363cf08ce16e09eb22da3a67474820.tar.gz
tk-65a269fcf2363cf08ce16e09eb22da3a67474820.tar.bz2
Add various X11 stub functions, Cygwin only
remove TkBindDeadWindow from Cygwin stub table [Bug 3540127]: filebox.test fails on win32
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r--win/tkWinDialog.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 55152e9..5d9d82f 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -603,21 +603,16 @@ GetFileNameW(
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
static CONST char *saveOptionStrings[] = {
- "-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", "-typevariable",
- "-confirmoverwrite",
- NULL
+ "-confirmoverwrite", "-defaultextension", "-filetypes", "-initialdir",
+ "-initialfile", "-parent", "-title", "-typevariable", NULL
};
static CONST char *openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", "-typevariable",
- "-multiple",
- NULL
+ "-multiple", "-parent", "-title", "-typevariable", NULL
};
enum options {
- FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
- FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE,
- FILE_MULTIPLE_OR_CONFIRMOW
+ FILE_MULTIPLE_OR_CONFIRMOW, FILE_DEFAULT, FILE_TYPES, FILE_INITDIR,
+ FILE_INITFILE, FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE
};
file[0] = '\0';
@@ -638,6 +633,12 @@ GetFileNameW(
"option", 0, &index) != TCL_OK) {
goto end;
}
+ /* Compensate for the "openOptionStrings" having different ordering [Bug #3540127] */
+ if (open && (index < FILE_PARENT)) {
+ if (++index > FILE_INITFILE) {
+ index = FILE_MULTIPLE_OR_CONFIRMOW;
+ }
+ }
if (i + 1 == objc) {
string = Tcl_GetString(optionPtr);