Bug 529074: Remove use of <preferences> and <preference> from <setting> (parts I missed)
--- a/mobile/chrome/content/bindings/setting.xml
+++ b/mobile/chrome/content/bindings/setting.xml
@@ -53,17 +53,17 @@
<field name="prefs">
Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch2);
</field>
</implementation>
</binding>
<binding id="setting-base">
- <implementation implements="nsIObserver">
+ <implementation>
<constructor><![CDATA[
this.preferenceChanged();
if (this.usePref)
this._prefs.addObserver(this.pref, this._observer, true);
]]></constructor>
<field name="_observer"><![CDATA[({
@@ -155,18 +155,20 @@
</method>
<property name="usePref" readonly="true" onget="return this.hasAttribute('pref');"/>
<property name="pref" readonly="true" onget="return this.getAttribute('pref');"/>
<property name="type" readonly="true" onget="return this.getAttribute('type');"/>
<property name="value" onget="return this.input.value;" onset="return this.input.value = val;"/>
<field name="_prefs">
- Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch2);
+ this.settings ?
+ this.settings.prefs :
+ Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch2);
</field>
<field name="_updatingInput">false</field>
<field name="input">document.getAnonymousElementByAttribute(this, "anonid", "input");</field>
<field name="settings">
this.parentNode.localName == "settings" ? this.parentNode : null;
</field>