SeaMonkey:Toolkit Transition:PrefwindowPanes:HowTo: Difference between revisions

Line 17: Line 17:


==== 1. Tree items ====
==== 1. Tree items ====
Edit ''/suite/common/pref/preferences.xul'' (or the respective overlay) and set the following attributes on the respective <treeitem>:
Edit ''/suite/common/pref/preferences.xul'' (or the respective overlay, if eg. you're migrating a MailNews panel) and set the following attributes on the respective <treeitem>:


  <treeitem id="securityItem"
  <treeitem container="true"
           prefpane="security_pane"
           id="navigator"
           label="&security.label;"
           label="&navigator.label;"
           url="chrome://communicator/content/pref/pref-security.xul">
          prefpane="navigator_pane"
          helpTopic="navigator_pref_navigator"
           url="chrome://communicator/content/pref/pref-navigator.xul">


* The ''id'' attribute should adhere to the "xxxItem" meme.
* The ''id'' attribute should adhere to the "xxxItem" meme &mdash; and all <treeitem>s should have an ''id''! This ''id'' is used by overlays to place themselves at the correct place. (Certain old names - like the above - may not yet follow this, but this should be fixed!)
* The ''prefpane'' attribute should adhere to the "xxx_pane" meme. This will be the ''id'' of the preference panel to be reached by this <treeitem>.
* Keep the ''label'' of the old panel.
* Keep the ''label'' of the old panel.
* The ''prefpane'' attribute should adhere to the "xxx_pane" meme. This will be the ''id'' of the preference panel to be reached by this <treeitem> (see below).
* Set the ''helpTopic'' attribute to the respective help identifier (see below).
* Set the ''url'' attribute to the chrome URI of the panel to be reached by this <treeitem>.
* Set the ''url'' attribute to the chrome URI of the panel to be reached by this <treeitem>.
==== 2. Panels ====
Old panels were actually "real" documents, loaded into a browser window. New panels are <prefpane> elements, overlayed over the main window.
235

edits