Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: psycho_maniac on April 24, 2009, 12:07:39 PM

Title: excluding some settings when saving?
Post by: psycho_maniac on April 24, 2009, 12:07:39 PM
what do you guys think of excluding some settings when you save? really the only settings im talking about is the settings in the quick menu as thats what its for and maybe the volume. what do you think?
Title: Re: excluding some settings when saving?
Post by: Llorean on April 24, 2009, 12:50:54 PM
If you'd like settings to always reset to a default value on boot, simply use fixed.cfg.
Title: Re: excluding some settings when saving?
Post by: psycho_maniac on April 24, 2009, 01:05:33 PM
im talking about when switching configles quickly. i suppose i could just take them settings out manually each time i save.
Title: Re: excluding some settings when saving?
Post by: Llorean on April 24, 2009, 04:50:44 PM
Yes, you should remove values from the config file that you don't want changed.

Many people have a config file for "line out" for example that turns off any sound altering settings (equalizer, bass, treble) and adjusts the volume to 0dB. In these cases, you'd explicitly want the volume saved.
Title: Re: excluding some settings when saving?
Post by: JdGordon on April 24, 2009, 05:05:01 PM
this is sort of something I've been thinking about doing for a while. you could easily create a plugin which lets you choose which settings to write to a config, the problem is some have cryptic names and because there is no structure in the order of the settings (they follow the order in settings_list.c), and also because there is no translation in plugins (yet) it would be hard to use...

that said, if someone wanted to do it, look at settings_dumper (or something) for how to enumerate the settings from a plugin, and disk tidy for an example of how to do a "checkbox" list
Title: Re: excluding some settings when saving?
Post by: Llorean on April 24, 2009, 05:08:32 PM
Maybe the simplest (to use) solution could be to have alongside the "save .cfg file" option an option such as "save changed settings" which would only save values that were non-default.

Then you could make a 'limited' config file by simply resetting to default, changing to the different settings you want, and using the limited save.
Title: Re: excluding some settings when saving?
Post by: JdGordon on April 24, 2009, 05:10:12 PM
that is exactly what config.cfg is... so you could also just make a copy of that and it would have the same effect
Title: Re: excluding some settings when saving?
Post by: Llorean on April 24, 2009, 05:11:21 PM
Yes, but copying config.cfg requires navigating into a hidden folder, and then moving and renaming a file. While it's certainly doable, it's not the most user-friendly.

I was basically just suggesting a user-friendly way to get what would be saved as config.cfg.
Title: Re: excluding some settings when saving?
Post by: JdGordon on April 24, 2009, 05:22:43 PM
yes, but sometimes you actually want to put the default values into the config
Title: Re: excluding some settings when saving?
Post by: psycho_maniac on May 12, 2009, 03:15:52 PM
i dont know how to code so is there  a patch somewhere i could maybe test? and help get it into svn?
Title: Re: excluding some settings when saving?
Post by: JdGordon on May 12, 2009, 03:20:32 PM
was there any indication in this thread that there might be?
Title: Re: excluding some settings when saving?
Post by: psycho_maniac on May 12, 2009, 09:19:38 PM
no but you said you were thinking about something like this but i was just asking. maybe keep us posted. it doesnt hurt to ask
Title: Re: excluding some settings when saving?
Post by: GodEater on May 13, 2009, 02:00:44 AM
Have you been taking the impatient pills recently psycho_maniac ? :)