|
From: <cre...@us...> - 2006-09-18 19:28:15
|
Revision: 1508
http://svn.sourceforge.net/frontierkernel/?rev=1508&view=rev
Author: creecode
Date: 2006-09-18 12:28:12 -0700 (Mon, 18 Sep 2006)
Log Message:
-----------
on Mac, in sfdialog function only manipulate filespec at start of function only if sfverb == sfputfileverb
Modified Paths:
--------------
Frontier/branches/FSRef_Migration/Common/source/filedialog.c
Modified: Frontier/branches/FSRef_Migration/Common/source/filedialog.c
===================================================================
--- Frontier/branches/FSRef_Migration/Common/source/filedialog.c 2006-09-18 19:20:20 UTC (rev 1507)
+++ Frontier/branches/FSRef_Migration/Common/source/filedialog.c 2006-09-18 19:28:12 UTC (rev 1508)
@@ -495,14 +495,13 @@
#ifdef MACVERSION
//
- // 2006-08-25 creedon: minimally FSRef-ized
+ // 2006-09-15 creedon: minimally FSRef-ized
//
- // 2005-10-06 creedon: added filecreator parameter, used for get file
- // dialog
+ // 2005-10-06 creedon: added filecreator parameter, used for get file dialog
//
// 2005-09-21 creedon: changed from TimsGetFile to getafile
//
- // 2000-06-20 Timothy Paustian: I am going to hack the heck out of this routine. See what you think
+ // 2000-06-20 Timothy Paustian: I am going to hack the heck out of this routine. See what you think
//
// 4.1b13 dmb: un-commented out the shellwritescrap and shellactive calls.
// I don't know how they got commented; I must have been experimenting with
@@ -529,7 +528,7 @@
// 4/16/91 dmb: replaced filetype parameter with pointer to type list. callers
// can pass nil when irrelevant, or when all types are to be shown.
//
- // 11/16/90 dmb: replace flput boolean with sfverb enum. added code for folder
+ // 11/16/90 dmb: replace flput boolean with sfverb enum. added code for folder
// and disk selection dialogs
//
// 8/1/90 dmb: if filetype is zero, show all files by passing zero to SFGetFile
@@ -542,29 +541,31 @@
clearbytes ( &fspect, sizeof ( fspect ) );
- // move the switch statement to below because it's smarter to call it there when using the new routines for Nav services.
+ // move the switch statement to below because it's smarter to call it there when using the new routines for Nav
+ // services.
clearbytes (&sfdata, sizeof (sfdata));
+
+ if ( sfverb == sfputfileverb ) {
- if ( extendfilespec ( fspec, fspec ) ) {
-
+ extendfilespec ( fspec, fspec );
+
if ( ( *fspec ).path == NULL )
FSGetCatalogInfo ( &( *fspec ).fsref, kFSCatInfoNone, NULL, NULL, &fspect, NULL );
else {
FSCatalogInfo catalogInfo;
- FSGetCatalogInfo ( &( *fspec ).fsref, kFSCatInfoVolume | kFSCatInfoNodeID, &catalogInfo, NULL, NULL, NULL );
+ FSGetCatalogInfo ( &( *fspec ).fsref, kFSCatInfoVolume | kFSCatInfoNodeID, &catalogInfo, NULL, NULL,
+ NULL );
fspect.vRefNum = catalogInfo.volume;
fspect.parID = catalogInfo.nodeID;
CFStringRefToStr255 ( ( *fspec ).path, fspect.name );
+
}
}
- else
- if ( ( *fspec ).path != NULL )
- CFStringRefToStr255 ( ( *fspec ).path, fspect.name );
-
+
if ( filetypes != NULL )
filetype = ( *filetypes ).types [ 0 ];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|