[PATCH 3/3] Clean up preference saving code

Henrik Brautaset Aronsen henrik at synth.no
Fri Jan 11 00:47:16 PST 2013


Linus Torvalds wrote:
> The old code (on purpose) didn't try to differentiate "nonexisting
> boolean configuration" with "existing boolean configuration set to
> false", which is problematic if we optimize the saving to not save
> default preferences at all.

If I start Subsurface without any config file, enter and exit the 
Preferences, and exit, some default settings will still be saved:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
         <key>divelist_font</key>
         <string>Arial Unicode MS 9</string>
         <key>gfhigh</key>
         <string>75</string>
         <key>gflow</key>
         <string>30</string>
         <key>phethreshold</key>
         <string>13.0</string>
         <key>pn2threshold</key>
         <string>4.0</string>
         <key>po2threshold</key>
         <string>1.6</string>
</dict>
</plist>

Cheers,
Henrik


More information about the subsurface mailing list