[Project_owners] Extension preferences

Brian King brian at mozdev.org
Thu Jan 15 22:53:29 EST 2004

On 15.1.2004 19:37, Nathan R. Yergler wrote:

> That helps.  I was able to get prefs to save properly under Mozilla 
> Firebird.  And I was able to explicitly save them under Mozilla Suite.  
> But I'm trying to get my preferences pane integrated with the Mozilla 
> Suite preferences, and would like to be able to trap whether the user 
> clicks OK or cancel, so I know whether to save or not.  Just not sure 
> how to do that since Mozilla provides the OK/Cancel buttons, not the 
> extension.  Thoughts?  Thanks again.

You shouldn't need to do any explicit saving, if your panel is set up 
correctly. All you need to do is set up an array called '_elementIDs' in 
your panel that holds all the ids of the XUL elements that hold the 
prefs values. Then you should set up the 'preftype' and 'prefstring' 
attributes on those XUL elements. All the rest is taken care of 

Look at any prefs panel for an example, e.g.

Brian King

More information about the Project_owners mailing list