[Project_owners] shared profiles

Brian King brian at mozdev.org
Fri Jul 30 19:02:11 EDT 2004

On 30.7.2004 14:55, Patrick Brunschwig wrote:

> All settings in user.js are just the delta to the default prefs. As long
> as the default is not overwritten, they are always automatically taken
> from ...\defaults\pref. Using the clearUserPref function, you can reset
> a user defined setting to te default. I.e. you don't need to do anything
> specifically to use settings from the defaults.
> Of course, a user cannot modify any settings in the defaults, but you
> can copy any file with any settings into the folder and it will be
> respected. This is e.g. what the shellblock XPI does to block shell://
> links.

Ok, I understand that you can place a file, say 'myapp.js' in 
defaults/pref/ and they will be picked up.

But how do you write to that file exclusively when calling setPref, 
instead of the profile 'prefs.js'? The only related API call I see is 
nsIPref:savePrefFile(in nsIFile aFile), but this appears to write *all* 
current preferences. I just want to do it on a one by one basis for 
certain prefs.

Brian King
www.mozdev.org - free project hosting for the mozilla community

More information about the Project_owners mailing list