diff options
Diffstat (limited to 'mac/tkMacDialog.c')
-rw-r--r-- | mac/tkMacDialog.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/mac/tkMacDialog.c b/mac/tkMacDialog.c index 629860c..d242c01 100644 --- a/mac/tkMacDialog.c +++ b/mac/tkMacDialog.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacDialog.c,v 1.6 2000/04/23 03:47:24 jingham Exp $ + * RCS: @(#) $Id: tkMacDialog.c,v 1.7 2001/11/23 02:05:41 das Exp $ */ #include <Gestalt.h> @@ -228,7 +228,7 @@ Tk_ChooseColorObjCmd( cpinfo.theColor.color.rgb.green = in.green; cpinfo.theColor.color.rgb.blue = in.blue; cpinfo.dstProfile = 0L; - cpinfo.flags = CanModifyPalette | CanAnimatePalette; + cpinfo.flags = kColorPickerCanModifyPalette | kColorPickerCanAnimatePalette; cpinfo.placeWhere = kDeepestColorScreen; cpinfo.pickerType = 0L; cpinfo.eventProc = NULL; @@ -454,11 +454,11 @@ Tk_GetSaveFileObjCmd( Str255 title, message; OpenFileData ofd; static char *saveOptionStrings[] = { - "-defaultextension", "-initialdir", "-initialfile", + "-defaultextension", "-filetypes", "-initialdir", "-initialfile", "-message", "-parent", "-title", NULL }; enum saveOptions { - SAVE_DEFAULT, SAVE_INITDIR, SAVE_INITFILE, + SAVE_DEFAULT, SAVE_TYPES, SAVE_INITDIR, SAVE_INITFILE, SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE }; @@ -493,6 +493,8 @@ Tk_GetSaveFileObjCmd( switch (index) { case SAVE_DEFAULT: break; + case SAVE_TYPES: + break; case SAVE_INITDIR: choice = Tcl_GetStringFromObj(objv[i + 1], NULL); if (HandleInitialDirectory(interp, choice, &dirSpec, @@ -712,7 +714,7 @@ HandleInitialDirectory ( Tcl_AppendResult(interp, "bad directory \"", initialDir, "\"", NULL); return TCL_ERROR; } - err = FSpGetDirectoryID(dirSpec, &dirID, &isDirectory); + err = FSpGetDirectoryIDTcl(dirSpec, &dirID, &isDirectory); if ((err != noErr) || !isDirectory) { Tcl_AppendResult(interp, "bad directory \"", initialDir, "\"", NULL); return TCL_ERROR; @@ -1055,10 +1057,18 @@ OpenEventProc( if (callBackSelector == kNavCBPopupMenuSelect) { chosenItem = (NavMenuItemSpec *) callBackParams->eventData.eventDataParms.param; ofd->curType = chosenItem->menuType; - } else if (callBackSelector == kNavCBAdjustRect || callBackSelector & otherEvent != 0) { + } else if ( callBackSelector & otherEvent != 0) { while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT|TCL_WINDOW_EVENTS)) { /* Empty Body */ } + } else if (callBackSelector == kNavCBEvent) { + if (callBackParams->eventData.eventDataParms.event->what == updateEvt) { + if (TkMacConvertEvent( callBackParams->eventData.eventDataParms.event)) { + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT|TCL_WINDOW_EVENTS)) { + /* Empty Body */ + } + } + } } } @@ -1121,7 +1131,7 @@ StdGetFile( if (isOpen == OPEN_FILE) { if (ofd != NULL && ofd->usePopup) { CustomGetFile(openFilter, (short) -1, NULL, &reply, OPEN_BOX, - mypoint, openHook, NULL, NULL, NULL, (void*) &ofd); + mypoint, openHook, NULL, NULL, NULL, (void*) ofd); } else { StandardGetFile(NULL, -1, NULL, &reply); } @@ -1213,7 +1223,7 @@ OpenHookProc( if (ofdPtr->usePopup) { GetDialogItem(theDialog, ofdPtr->popupItem, &ignore, &handle, &rect); - newType = GetCtlValue((ControlRef) handle) - 1; + newType = GetControlValue((ControlRef) handle) - 1; if (ofdPtr->curType != newType) { if (newType<0 || newType>ofdPtr->fl.numFilters) { /* |