<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Yes, BibleCS uses this mechanism.<br>
<br>
Any configuration information it wishes to store about a module,
recognized by SWORD or not, or anything it wishes to override in a
module (e.g., Font, CipherKey) are stored in a one file:
userprefs.conf<br>
<br>
In our subclass of SWMgr, we override the virtual Load (sorry for
not camelCase; SWMgr hasn't gone through the standardization
process yet):<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
signed char BibleCSMGR::Load() {<br>
signed char retval = SWMgr::Load();<br>
userPrefs = new
SWConfig(TForm1::getDataRootPath()+"/BibleCS/userprefs.conf");<br>
config->augment(*userPrefs);<br>
}<br>
<br>
This is the line which does the trick:<br>
<br>
config->augment(*userPrefs);<br>
<br>
SWMgr::config is SWMgr's loaded and compiled SWConfig object of
all modules.<br>
SWConfig::augment(...) augments all config settings that are also
present in userPrefs. Values present in config which are also
present in userPrefs will be overridden with the values from
userPrefs; all settings which are not yet present in config are
copied to config from userPrefs.<br>
<br>
<br>
<br>
<br>
On 12/17/2014 09:38 AM, DM Smith wrote:<br>
</div>
<blockquote
cite="mid:0D86FB0B-177A-49D3-90BD-AFA619C5CA48@crosswire.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
One of the things that we’ve tossed about for a while is keeping
the conf of the module pristine and storing the cipher key in
another file. That other file would hold all the frontend edits
for the confs. It would have the form:
<div class="">[NASB]</div>
<div class="">CipherKey=asdf</div>
<div class="">[KJV]</div>
<div class="">Font=yadayadayada</div>
<div class="">…</div>
<div class=""><br class="">
</div>
<div class="">I was going to roll my own in JSword, but Troy said
that this mechanism already exists in SWORD. It would be nice to
standardize the location and naming of such.</div>
<div class=""><br class="">
</div>
<div class="">— DM</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 17, 2014, at 9:45 AM, Karl Kleinpaste
<<a moz-do-not-send="true"
href="mailto:karl@kleinpaste.org" class="">karl@kleinpaste.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> <font
class="" face="FreeSerif">A suggestion for all apps:
When updating a locked module, keep/re-use the old
CipherKey.<br class="">
<br class="">
This was a suggestion from Greg during rapid updates
in his </font><font class="" face="FreeSerif"><font
class="" face="FreeSerif">NASB </font>testing
cycle. Having to re-paste or re-type the key is a
pain and should be unnecessary. If the user has had
the module a long time, he may no longer have the key
otherwise. Generally speaking, I think we can expect
that a module's updates will continue to have the same
key.<br class="">
<br class="">
I did this for Xiphos, and then forwarded the thought
to Nic who has already added it to PS as well. It
seems to me that this is a good universal behavior for
Sword apps.<br class="">
</font> </div>
_______________________________________________<br
class="">
sword-devel mailing list: <a moz-do-not-send="true"
href="mailto:sword-devel@crosswire.org" class="">sword-devel@crosswire.org</a><br
class="">
<a moz-do-not-send="true"
href="http://www.crosswire.org/mailman/listinfo/sword-devel"
class="">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br
class="">
Instructions to unsubscribe/change your settings at above
page</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
<br>
</body>
</html>