summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDialog.c
diff options
context:
space:
mode:
authordas <das>2007-10-26 10:37:14 (GMT)
committerdas <das>2007-10-26 10:37:14 (GMT)
commit6e38d195e11da4f2d48a280687dac3c1c0dfffc0 (patch)
tree10f5d348f0866fa4d1bea8a1e2eaf178ebd7b303 /macosx/tkMacOSXDialog.c
parent02d81aeb68bbe92a6fa9271ff80b1da2da5b879c (diff)
downloadtk-6e38d195e11da4f2d48a280687dac3c1c0dfffc0.zip
tk-6e38d195e11da4f2d48a280687dac3c1c0dfffc0.tar.gz
tk-6e38d195e11da4f2d48a280687dac3c1c0dfffc0.tar.bz2
* macosx/tkMacOSXDialog.c: sync with HEAD.
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r--macosx/tkMacOSXDialog.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 622149b..86074b8 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.19 2007/09/11 05:24:24 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4.2.20 2007/10/26 10:37:14 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -38,14 +38,13 @@
* The following structures are used in the GetFileName() function. They store
* information about the file dialog and the file filters.
*/
-
-typedef struct OpenFileData {
- FileFilterList fl; /* List of file filters. */
- SInt16 curType; /* The filetype currently being listed. */
- short popupItem; /* Item number of the popup in the dialog. */
- int usePopup; /* True if we show the popup menu (this is
- * an open operation and the -filetypes
- * option is set). */
+typedef struct _OpenFileData {
+ FileFilterList fl; /* List of file filters. */
+ SInt16 curType; /* The filetype currently being listed. */
+ short popupItem; /* Item number of the popup in the dialog. */
+ short usePopup; /* True if we show the popup menu (this */
+ /* is an open operation and the */
+ /* -filetypes option is set). */
} OpenFileData;
typedef struct NavHandlerUserData {
@@ -85,7 +84,8 @@ static int NavServicesGetFile(Tcl_Interp *interp,
OpenFileData *ofd, AEDesc *initialDescPtr,
char *initialFile, AEDescList *selectDescPtr,
CFStringRef title, CFStringRef message,
- int multiple, int isOpen, Tk_Window parent);
+ int multiple, int isOpen,
+ Tk_Window parent);
static int HandleInitialDirectory(Tcl_Interp *interp,
char *initialFile, char *initialDir, FSRef *dirRef,
AEDescList *selectDescPtr, AEDesc *dirDescPtr);
@@ -988,10 +988,11 @@ OpenEventProc(
NavCallBackUserData callBackUD)
{
NavHandlerUserData *data = (NavHandlerUserData*) callBackUD;
+ OpenFileData *ofd = data->ofdPtr;
switch (callBackSelector) {
case kNavCBPopupMenuSelect:
- data->ofdPtr->curType = ((NavMenuItemSpec *)
+ ofd->curType = ((NavMenuItemSpec *)
callBackParams->eventData.eventDataParms.param)->menuType;
break;
case kNavCBAccept:
@@ -1077,7 +1078,7 @@ OpenFileFilterProc(
fileName[len] = '\0';
fileNamePtr = (unsigned char*) fileName;
- } else if ((theItem->descriptorType = typeFSRef)) {
+ } else if ((theItem->descriptorType == typeFSRef)) {
OSStatus err;
FSRef *theRef = (FSRef *) *theItem->dataHandle;
HFSUniStr255 uniFileName;