Add string resource giving a path in addition to /palm/Launcher where

we'll search for dictionaries so users can unclutter the default dir.
This commit is contained in:
ehouse 2004-11-11 07:49:48 +00:00
parent d515e63d8a
commit 953f580554
2 changed files with 13 additions and 1 deletions

View file

@ -143,6 +143,8 @@ BEGIN
#endif
END
STRING ID 1000 "/palm/programs/Crosswords/"
APPLICATIONICONNAME ID 1000 ICONTEXT
/* force hotsync into games category */

View file

@ -260,6 +260,7 @@ tryVFSSearch( MPFORMAL PalmDictList** dlp, XP_U32 creatorSought,
vEnum = vfsIteratorStart;
while ( vEnum != vfsIteratorStop ) {
unsigned char pathStr[265];
MemHandle h;
UInt16 bufLen;
err = VFSVolumeEnumerate( &volNum, &vEnum );
@ -270,11 +271,20 @@ tryVFSSearch( MPFORMAL PalmDictList** dlp, XP_U32 creatorSought,
bufLen = sizeof(pathStr);
err = VFSGetDefaultDirectory( volNum, ".pdb", (char*)pathStr,
&bufLen );
if ( err == errNone ) {
searchDir( MPPARM(mpool) dlp, volNum, pathStr[0],
pathStr, sizeof(pathStr), creatorSought, versSought );
}
h = DmGetResource( 'tSTR', 1000 );
if ( !!h ) {
pathStr[0] = '\0';
XP_STRCAT( pathStr, MemHandleLock(h) );
MemHandleUnlock( h );
DmReleaseResource( h );
searchDir( MPPARM(mpool) dlp, volNum, pathStr[0],
pathStr, sizeof(pathStr), creatorSought, versSought );
}
}
} /* tryVFSSearch */