[sword-devel] Module locations
Troy A. Griffitts
sword-devel@crosswire.org
Mon, 28 Apr 2003 03:04:27 -0700
Will,
If you want to add a path at runtime, after your SWMgr has been
created, you might get away with just calling SWMgr::augmentPath(const
char *path)
I'm not sure this is a very good idea. You'd probably want to reload
the module list completely, as the user might have removed a path also.
I'd recommend:
delete mgr;
mgr = new SWMgr();
after the prefs are changed.
... but I'm not sure exactly the context of the question, so I'm sure
you'll be a better judge than me.
-Troy.
Will Thimbleby wrote:
> Thanks for the info on threading, I think I've sorted everything out in
> the end. It wasn't the sword code that was crashing, but having two
> managers has fixed one of my bugs. Cheers.
>
> I'll worry about locales later, cheers for the heads up on that Joachim.
>
>> I'm not sure I understand your last question, but I think you might be
>> asking about having an /etc/sword.conf that looks like this:
>>
>> [Install]
>> DataPath=/usr/share/sword
>> AugmentPath=/mnt/card/usr/share/sword
>> AugmentPath=/mnt/cf/usr/share/sword
>>
>> That's the default configuration we use on the Zaurus handheld, so it
>> finds books in ram, on an SD memory card, and on a CF card.
>
>
>
> What I meant was. Is there anyway to do this in the program. To load up
> the manager and add these paths in at run-time. For instance if the user
> changed the preferences of where to look for modules, then to add that
> as a path and to refresh the module lists.
>
> Will
>
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel