[Project_owners] Reset user preferences to default?

David Duong david.nqd at gmail.com
Fri Feb 10 18:59:33 EST 2006


Thanks, but that just nukes it (as expected).  After the call the branch
will no longer exist.

Has anyone had any experience with resetBranch?  Is there something that I'm
doing wrong?

On 2/10/06, Brian King <brian at mozdev.org> wrote:
>
> David Duong wrote:
> > I meant to write:
> >   var prefs = Components.classes["@ mozilla.org/preferences-service;1"].
> >       getService(Components.interfaces.nsIPrefBranch);
> >   prefs.resetBranch('extensions.termblaster.');
> >
> > Is there a standard way to reset preferences?
>
> Use deleteBranch. e.g.
>
> var prefs = Components.classes["@mozilla.org/preferences-service;1"].
>                getService(Components.interfaces.nsIPrefBranch);
> prefs.deleteBranch("extensions.termblaster");
>
> I think this clears the profile prefs.js of any entries for the given
> branch.
>
> --
> Brian King
> www.mozdev.org - free project hosting for the Mozilla community
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060210/d92df7ce/attachment.htm


More information about the Project_owners mailing list