From 953f580554630cd9cddcdafa5e2a15896a6b1629 Mon Sep 17 00:00:00 2001 From: ehouse Date: Thu, 11 Nov 2004 07:49:48 +0000 Subject: [PATCH] Add string resource giving a path in addition to /palm/Launcher where we'll search for dictionaries so users can unclutter the default dir. --- palm/common.rcp.pre | 2 ++ palm/dictlist.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/palm/common.rcp.pre b/palm/common.rcp.pre index 28794a3a0..14f34a0c2 100644 --- a/palm/common.rcp.pre +++ b/palm/common.rcp.pre @@ -143,6 +143,8 @@ BEGIN #endif END +STRING ID 1000 "/palm/programs/Crosswords/" + APPLICATIONICONNAME ID 1000 ICONTEXT /* force hotsync into games category */ diff --git a/palm/dictlist.c b/palm/dictlist.c index 8cdba1b7e..4706b3b18 100644 --- a/palm/dictlist.c +++ b/palm/dictlist.c @@ -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 */