From b63c6a9a847635b11a9259faf12927558c09479b Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 30 Jan 2007 05:28:13 +0000 Subject: [PATCH] Bug #3459 --> inline subject spell checking should honor the global inline spell check settings. sr=bienvenu --- .../compose/content/MsgComposeCommands.js | 14 ++++++++++---- .../compose/content/messengercompose.xul | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js index 1ae1dfe15a3d..9c2346fed61d 100644 --- a/mail/components/compose/content/MsgComposeCommands.js +++ b/mail/components/compose/content/MsgComposeCommands.js @@ -258,7 +258,7 @@ var gComposeRecyclingListener = { } // Stop InlineSpellCheckerUI so personal dictionary is saved - InlineSpellCheckerUI.enabled = false; + enableInlineSpellCheck(false); //Reset editor EditorResetFontAndColorAttributes(); @@ -1594,8 +1594,8 @@ function ComposeUnload() { dump("\nComposeUnload from XUL\n"); - // Stop InlineSpellCheckerUI so personal dictionary is saved - InlineSpellCheckerUI.enabled = false; + // Stop InlineSpellCheckerUI so personal dictionary is saved + enableInlineSpellCheck(false); EditorCleanup(); @@ -3614,6 +3614,12 @@ function InitEditor() gMsgCompose.initEditor(editor, window.content); InlineSpellCheckerUI.init(editor); - InlineSpellCheckerUI.enabled = sPrefs.getBoolPref("mail.spellcheck.inline"); + enableInlineSpellCheck(sPrefs.getBoolPref("mail.spellcheck.inline")); document.getElementById('menu_inlineSpellCheck').setAttribute('disabled', !InlineSpellCheckerUI.canSpellCheck); } + +function enableInlineSpellCheck(aEnableInlineSpellCheck) +{ + InlineSpellCheckerUI.enabled = aEnableInlineSpellCheck; + document.getElementById('msgSubject').setAttribute('spellcheck', aEnableInlineSpellCheck); +} diff --git a/mail/components/compose/content/messengercompose.xul b/mail/components/compose/content/messengercompose.xul index 13503a53ca18..28ce2965b7f9 100644 --- a/mail/components/compose/content/messengercompose.xul +++ b/mail/components/compose/content/messengercompose.xul @@ -416,7 +416,7 @@ + type="checkbox" oncommand="enableInlineSpellCheck(!InlineSpellCheckerUI.enabled);"/>