Bug 354580 Add "Ignore word" to inline spellchecker used for editable elements for SM and conflicting accesskey for /browser

p=me r=neil/gavin.sharp sr=mscott
This commit is contained in:
bugzilla%arlen.demon.co.uk 2006-10-06 00:14:18 +00:00
parent 770390e534
commit 24dd884cd2
5 changed files with 16 additions and 3 deletions

View File

@ -375,7 +375,7 @@
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
<!ENTITY spellAddToDictionary.label "Add to dictionary">
<!ENTITY spellAddToDictionary.accesskey "t">
<!ENTITY spellAddToDictionary.accesskey "o">
<!ENTITY spellEnable.label "Spell check this field">
<!ENTITY spellEnable.accesskey "S">
<!ENTITY spellNoSuggestions.label "(No spelling suggestions)">

View File

@ -75,10 +75,15 @@
<menuitem id="spell-no-suggestions"
disabled="true"
label="&spellNoSuggestions.label;"/>
<menuseparator id="spell-add-separator"/>
<menuitem id="spell-add-to-dictionary"
label="&spellAddToDictionary.label;"
accesskey="&spellAddToDictionary.accesskey;"
oncommand="InlineSpellCheckerUI.addToDictionary();"/>
<menuitem id="spell-ignore-word"
label="&spellIgnoreWord.label;"
accesskey="&spellIgnoreWord.accesskey;"
oncommand="InlineSpellCheckerUI.ignoreWord();"/>
<menuseparator id="spell-suggestions-separator"/>
<menuitem id="context-openlink"
label="&openLinkCmd.label;"

View File

@ -230,12 +230,14 @@ nsContextMenu.prototype = {
document.getElementById("spell-check-enabled").setAttribute("checked",
InlineSpellCheckerUI.enabled);
this.showItem("spell-add-to-dictionary", onMisspelling);
this.showItem("spell-ignore-word", onMisspelling);
// suggestion list
this.showItem("spell-add-separator", onMisspelling);
this.showItem("spell-suggestions-separator", onMisspelling);
if (onMisspelling) {
var menu = document.getElementById("contentAreaContextMenu");
var suggestionsSeparator = document.getElementById("spell-add-to-dictionary");
var suggestionsSeparator = document.getElementById("spell-add-separator");
var numsug = InlineSpellCheckerUI.addSuggestionsToMenu(menu, suggestionsSeparator, 5);
this.showItem("spell-no-suggestions", numsug == 0);
} else {

View File

@ -100,7 +100,9 @@
<!ENTITY bidiSwitchTextDirectionItem.label "Switch Text Direction">
<!ENTITY bidiSwitchTextDirectionItem.accesskey "w">
<!ENTITY spellAddToDictionary.label "Add to dictionary">
<!ENTITY spellAddToDictionary.accesskey "t">
<!ENTITY spellAddToDictionary.accesskey "o">
<!ENTITY spellIgnoreWord.label "Ignore word">
<!ENTITY spellIgnoreWord.accesskey "w">
<!ENTITY spellEnable.label "Spell check this field">
<!ENTITY spellEnable.accesskey "S">
<!ENTITY spellNoSuggestions.label "(No spelling suggestions)">

View File

@ -279,5 +279,9 @@ var InlineSpellCheckerUI = {
addToDictionary: function()
{
this.mInlineSpellChecker.addWordToDictionary(this.mMisspelling);
},
ignoreWord: function()
{
this.mInlineSpellChecker.ignoreWord(this.mMisspelling);
}
};