Bug 7080 - Improve applet default settings api
: Improve applet default settings api
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: UI
: unspecified
: PC Windows XP
: -- normal (vote)
: 7.1
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-11 12:22 UTC by Richard Titmuss
Modified: 2008-08-04 14:05 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Titmuss 2008-02-11 12:22:57 UTC
It should be:

function defaultSettings(meta, settings)
   --- stuff
   return settings
end


This would allow creating new settings, modifying settings and performing setting upgrades.
Comment 1 Ben Klaas 2008-06-06 12:33:52 UTC
once a user has a settings.lua file, default settings are not used at all.

we want the ability to be able to read in existing settings on top of the defaults, so both can be used.
Comment 2 Ben Klaas 2008-06-20 09:46:08 UTC
support for upgradeSettings() added in 7.1 r2609

FYI, I did this as a test in SetupWallpaperMeta, and it worked like a charm--
function upgradeSettings(meta, settings)
       for id, wallpaper in pairs(settings) do
               if wallpaper == 'concrete.png' then
                       settings[id] = 'note.jpg'
                       log:warn('****************', settings[id])
               end
       end
       return settings
end
Comment 3 Chris Owens 2008-07-30 15:29:03 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.