summaryrefslogtreecommitdiffstats
path: root/mac/tkMacDialog.c
diff options
context:
space:
mode:
authordas <das>2001-11-23 02:04:08 (GMT)
committerdas <das>2001-11-23 02:04:08 (GMT)
commitaa409cc42da819e8ab1d081e7a1f175b33c1c2cf (patch)
tree0d0864ac4fc0b0ff178f5869f1600d2c584109c8 /mac/tkMacDialog.c
parent5efa25f6e1ad2a687cac8c1caab6d8c10f978269 (diff)
downloadtk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.zip
tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.gz
tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.bz2
** upport to 8.4 of mac code changes for 8.3.3 & various new
** changes for 8.4, some already backported to 8.3.4 (patch #435660) see ChangeLog for details
Diffstat (limited to 'mac/tkMacDialog.c')
-rw-r--r--mac/tkMacDialog.c26
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) {
/*