mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
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:
parent
d515e63d8a
commit
953f580554
2 changed files with 13 additions and 1 deletions
|
@ -143,6 +143,8 @@ BEGIN
|
||||||
#endif
|
#endif
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING ID 1000 "/palm/programs/Crosswords/"
|
||||||
|
|
||||||
APPLICATIONICONNAME ID 1000 ICONTEXT
|
APPLICATIONICONNAME ID 1000 ICONTEXT
|
||||||
|
|
||||||
/* force hotsync into games category */
|
/* force hotsync into games category */
|
||||||
|
|
|
@ -260,6 +260,7 @@ tryVFSSearch( MPFORMAL PalmDictList** dlp, XP_U32 creatorSought,
|
||||||
vEnum = vfsIteratorStart;
|
vEnum = vfsIteratorStart;
|
||||||
while ( vEnum != vfsIteratorStop ) {
|
while ( vEnum != vfsIteratorStop ) {
|
||||||
unsigned char pathStr[265];
|
unsigned char pathStr[265];
|
||||||
|
MemHandle h;
|
||||||
UInt16 bufLen;
|
UInt16 bufLen;
|
||||||
|
|
||||||
err = VFSVolumeEnumerate( &volNum, &vEnum );
|
err = VFSVolumeEnumerate( &volNum, &vEnum );
|
||||||
|
@ -270,11 +271,20 @@ tryVFSSearch( MPFORMAL PalmDictList** dlp, XP_U32 creatorSought,
|
||||||
bufLen = sizeof(pathStr);
|
bufLen = sizeof(pathStr);
|
||||||
err = VFSGetDefaultDirectory( volNum, ".pdb", (char*)pathStr,
|
err = VFSGetDefaultDirectory( volNum, ".pdb", (char*)pathStr,
|
||||||
&bufLen );
|
&bufLen );
|
||||||
|
|
||||||
if ( err == errNone ) {
|
if ( err == errNone ) {
|
||||||
searchDir( MPPARM(mpool) dlp, volNum, pathStr[0],
|
searchDir( MPPARM(mpool) dlp, volNum, pathStr[0],
|
||||||
pathStr, sizeof(pathStr), creatorSought, versSought );
|
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 */
|
} /* tryVFSSearch */
|
||||||
|
|
Loading…
Add table
Reference in a new issue