Closes #404, Add menu option to download spellcheck languages

This commit is contained in:
Dan Stillman 2007-04-06 19:10:32 +00:00
parent c019b7bcbf
commit e4c6193493

View File

@ -183,8 +183,11 @@
// dictionary list // dictionary list
var dictmenu = document.getAnonymousElementByAttribute(this, "anonid", var dictmenu = document.getAnonymousElementByAttribute(this, "anonid",
"spell-dictionaries-menu"); "spell-dictionaries-menu");
var numdicts = spellui.addDictionaryListToMenu(dictmenu, null); var addsep = document.getAnonymousElementByAttribute(this, "anonid",
this._setMenuItemVisibility("spell-dictionaries", enabled && numdicts > 1); "spell-language-separator");
var numdicts = spellui.addDictionaryListToMenu(dictmenu, addsep);
this._setMenuItemVisibility("spell-dictionaries", enabled);
this._doPopupItemEnabling(popupNode); this._doPopupItemEnabling(popupNode);
]]> ]]>
@ -238,9 +241,7 @@
<html:textarea class="textbox-textarea" flex="1" anonid="input" <html:textarea class="textbox-textarea" flex="1" anonid="input"
xbl:inherits="onfocus,onblur,xbl:text=value,disabled,tabindex,rows,cols,readonly,wrap"><children/></html:textarea> xbl:inherits="onfocus,onblur,xbl:text=value,disabled,tabindex,rows,cols,readonly,wrap"><children/></html:textarea>
<xul:menupopup anonid="input-box-contextmenu" <xul:menupopup anonid="input-box-contextmenu"
onpopupshowing="if (document.commandDispatcher.focusedElement != this.parentNode.firstChild) onpopupshowing="if (document.commandDispatcher.focusedElement != this.parentNode.firstChild) { this.parentNode.firstChild.focus(); } this.parentNode.parentNode._doPopupItemEnablingSpell(this);"
this.parentNode.firstChild.focus();
this.parentNode.parentNode._doPopupItemEnablingSpell(this);"
onpopuphiding="this.parentNode.parentNode._doPopupItemDisabling(this);" onpopuphiding="this.parentNode.parentNode._doPopupItemDisabling(this);"
oncommand="var cmd = event.originalTarget.getAttribute('cmd'); if(cmd) { this.parentNode.parentNode.doTextCommand(cmd); event.stopPropagation(); }"> oncommand="var cmd = event.originalTarget.getAttribute('cmd'); if(cmd) { this.parentNode.parentNode.doTextCommand(cmd); event.stopPropagation(); }">
<xul:menuitem label="&spellNoSuggestions.label;" anonid="spell-no-suggestions" disabled="true"/> <xul:menuitem label="&spellNoSuggestions.label;" anonid="spell-no-suggestions" disabled="true"/>
@ -261,7 +262,12 @@
<xul:menu label="&spellDictionaries.label;" accesskey="&spellDictionaries.accesskey;" anonid="spell-dictionaries"> <xul:menu label="&spellDictionaries.label;" accesskey="&spellDictionaries.accesskey;" anonid="spell-dictionaries">
<xul:menupopup anonid="spell-dictionaries-menu" <xul:menupopup anonid="spell-dictionaries-menu"
onpopupshowing="event.stopPropagation();" onpopupshowing="event.stopPropagation();"
onpopuphiding="event.stopPropagation();"/> onpopuphiding="event.stopPropagation();">
<xul:menuseparator anonid="spell-language-separator"/>
<xul:menuitem anonid="spell-add-dictionaries-main" label="&spellAddDictionaries.label;"
accesskey="&spellAddDictionaries.accesskey;"
oncommand="nsContextMenu.prototype.addDictionaries();"/>
</xul:menupopup>
</xul:menu> </xul:menu>
</xul:menupopup> </xul:menupopup>
</xul:hbox> </xul:hbox>