Adapt imTextboxUtils.jsm (with ifdefs) to use the Thunderbird specific spellchecker preference when built for Thunderbird, r=clokep.
authorFlorian Quèze <florian@instantbird.org>
Wed, 09 May 2012 16:23:21 +0200
changeset 22259 be48f94b7b41443373cfcbe385d767ee25a796b6
parent 22258 bd166fe26b1108534c501475b4ad9b6425743f49
child 22260 5ee10b1476384ec83d81e5554a176b024dc3d1c8
push id1225
push userflorian@queze.net
push dateSat, 11 Jan 2014 23:24:55 +0000
treeherdertry-comm-central@1d7aa08cb2d7 [default view] [failures only]
reviewersclokep
Adapt imTextboxUtils.jsm (with ifdefs) to use the Thunderbird specific spellchecker preference when built for Thunderbird, r=clokep.
chat/modules/imTextboxUtils.jsm
--- a/chat/modules/imTextboxUtils.jsm
+++ b/chat/modules/imTextboxUtils.jsm
@@ -150,20 +150,28 @@ let TextboxSize = {
   },
   observe: function(aSubject, aTopic, aMsg) {
     if (aTopic == "nsPref:changed" && aMsg == this._textboxAutoResizePrefName)
       this.autoResize = Services.prefs.getBoolPref(aMsg);
   }
 };
 
 let TextboxSpellChecker = {
+#ifndef MOZ_THUNDERBIRD
   _spellCheckPrefName: "layout.spellcheckDefault",
+#else
+  _spellCheckPrefName: "mail.spellcheck.inline",
+#endif
   _enabled: false,
  getValue: function tsc_getValue() {
+#ifndef MOZ_THUNDERBIRD
     this._enabled = !!Services.prefs.getIntPref(this._spellCheckPrefName);
+#else
+    this._enabled = Services.prefs.getBoolPref(this._spellCheckPrefName);
+#endif
   },
   applyValue: function tsc_applyValue(aTextbox) {
     if (this._enabled)
       aTextbox.setAttribute("spellcheck", "true");
     else
       aTextbox.removeAttribute("spellcheck");
   },