diff options
author | das <das> | 2007-05-09 12:57:44 (GMT) |
---|---|---|
committer | das <das> | 2007-05-09 12:57:44 (GMT) |
commit | f826ac6217b819d53876353acf2eb6688622564e (patch) | |
tree | 1ea5714938378ea764c1925d778432b293d1173e /macosx/tkMacOSXDialog.c | |
parent | c91f8973c04a4f3c48dd907359c7c98042e5d976 (diff) | |
download | tk-f826ac6217b819d53876353acf2eb6688622564e.zip tk-f826ac6217b819d53876353acf2eb6688622564e.tar.gz tk-f826ac6217b819d53876353acf2eb6688622564e.tar.bz2 |
* macosx/tkMacOSXWindowEvent.c: ensure window is brought to the front
* macosx/tkMacOSXMouseEvent.c: at the start of a window drag (except
* macosx/tkMacOSXInt.h: when cmd key is down); formatting and
whitespace fixes.
* macosx/tkMacOSXDialog.c (Tk_GetSaveFileObjCmd): add -filetypes option
processing.
* macosx/tkMacOSXEmbed.c (TkpMakeWindow, TkpUseWindow): fix sending of
Visibility event for embedded windows (fixes frame-3.9 hang).
* macosx/tkMacOSXScrlbr.c (ScrollbarBindProc): fix testsuite
* macosx/tkMacOSXSubwindows.c (TkMacOSXUpdateClipRgn): crashes by
adding sanity checks.
* macosx/tkMacOSXButton.c: fix debug msg typo.
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 538056a..c496cbf 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -10,7 +10,7 @@ * 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.4.2.13 2007/04/29 02:26:48 das Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4.2.14 2007/05/09 12:57:46 das Exp $ */ #include "tkMacOSXInt.h" @@ -424,9 +424,14 @@ Tk_GetSaveFileObjCmd( InitFileDialogs(); } + TkInitFileFilters(&ofd.fl); + ofd.curType = 0; + ofd.usePopup = 0; + for (i = 1; i < objc; i += 2) { char *choice, *string; int index, choiceLen; + char *types; if (Tcl_GetIndexFromObj(interp, objv[i], saveOptionStrings, "option", TCL_EXACT, &index) != TCL_OK) { @@ -442,7 +447,10 @@ Tk_GetSaveFileObjCmd( case SAVE_DEFAULT: break; case SAVE_FILETYPES: - /* Currently unimplemented - what would we do here anyway? */ + types = Tcl_GetString(objv[i + 1]); + if (TkGetFileFilters(interp, &ofd.fl, types, 0) != TCL_OK) { + goto end; + } break; case SAVE_INITDIR: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); @@ -480,8 +488,6 @@ Tk_GetSaveFileObjCmd( } } - TkInitFileFilters(&ofd.fl); - ofd.usePopup = 0; if (initialDesc.descriptorType == typeFSRef) { initialPtr = &initialDesc; } |