Bug #3459 --> inline subject spell checking should honor the global inline spell check settings. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2007-01-30 05:28:13 +00:00
parent f35dd3281d
commit b63c6a9a84
2 changed files with 11 additions and 5 deletions

View File

@ -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);
}

View File

@ -416,7 +416,7 @@
<menuitem label="&checkSpellingCmd.label;" id="menu_checkspelling" accesskey="&checkSpellingCmd.accesskey;" key="key_checkspelling" command="cmd_spelling"/>
<menuitem label="&enableInlineSpellChecker.label;" id="menu_inlineSpellCheck"
accesskey="&enableInlineSpellChecker.accesskey;" checked="false"
type="checkbox" oncommand="InlineSpellCheckerUI.enabled = !InlineSpellCheckerUI.enabled"/>
type="checkbox" oncommand="enableInlineSpellCheck(!InlineSpellCheckerUI.enabled);"/>
<menuitem label="&quoteCmd.label;" accesskey="&quoteCmd.accesskey;" command="cmd_quoteMessage"/>
<menuseparator/>
<menuitem id="returnReceiptMenu" type="checkbox" label="&returnReceiptMenu.label;" accesskey="&returnReceiptMenu.accesskey;" checked="false" oncommand="ToggleReturnReceipt(event.target)"/>