|
|
Line 271: |
Line 271: |
|
| |
|
| and add "Foo" to the services.sync.registerEngines preference (it's a comma separated list of engine names). | | and add "Foo" to the services.sync.registerEngines preference (it's a comma separated list of engine names). |
|
| |
| == Updating the Weave preferences screen ==
| |
|
| |
| Add a preference to turn your sync engine on/off by adding a line to <tt>weave/defaults/preferences/sync.js</tt> like so:
| |
|
| |
| pref("extensions.weave.engine.foo", true);
| |
|
| |
| Default to true or false as you see fit.
| |
|
| |
| Add a check box to the preferences screen to enable the user to change this setting, by adding a line to <tt>weave/chrome/content/fx-preferences.xul</tt> like this:
| |
|
| |
| <preference id="extensions.weave.engine.passwords"
| |
| name="extensions.weave.engine.passwords"
| |
| type="bool"/>
| |
|
| |
| right after all the other similar preferences.
| |
|
| |
| Finally, the preferences screen for Fennec is constructed separately, so to add your check box to the Fennec prefs screen as well you'll need to edit one more file. Open up <tt>weave/chrome/content/fennec-preferences.xul</tt> and add:
| |
|
| |
| <pre>
| |
| <richpref pref="extensions.weave.engine.foo"
| |
| title="Foo" type="bool">
| |
| Sync foo
| |
| </richpref>
| |
| </pre>
| |
|
| |
| right after the similar preferences.
| |
|
| |
| [TODO: Explain better where to add these.]
| |
|
| |
|
| == Testing and Debugging your Engine == | | == Testing and Debugging your Engine == |
|
| |
|
| TODO | | TODO |