From e4c6193493c82cd12c60979550e0d94ebdf5fa8c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 6 Apr 2007 19:10:32 +0000 Subject: [PATCH] Closes #404, Add menu option to download spellcheck languages --- .../content/zotero/bindings/timedtextarea.xml | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/chrome/content/zotero/bindings/timedtextarea.xml b/chrome/content/zotero/bindings/timedtextarea.xml index b0e82b4de..222cd8e13 100644 --- a/chrome/content/zotero/bindings/timedtextarea.xml +++ b/chrome/content/zotero/bindings/timedtextarea.xml @@ -183,9 +183,12 @@ // dictionary list var dictmenu = document.getAnonymousElementByAttribute(this, "anonid", "spell-dictionaries-menu"); - var numdicts = spellui.addDictionaryListToMenu(dictmenu, null); - this._setMenuItemVisibility("spell-dictionaries", enabled && numdicts > 1); - + var addsep = document.getAnonymousElementByAttribute(this, "anonid", + "spell-language-separator"); + + var numdicts = spellui.addDictionaryListToMenu(dictmenu, addsep); + this._setMenuItemVisibility("spell-dictionaries", enabled); + this._doPopupItemEnabling(popupNode); ]]> @@ -236,16 +239,14 @@ + xbl:inherits="onfocus,onblur,xbl:text=value,disabled,tabindex,rows,cols,readonly,wrap"> + onpopupshowing="if (document.commandDispatcher.focusedElement != this.parentNode.firstChild) { this.parentNode.firstChild.focus(); } this.parentNode.parentNode._doPopupItemEnablingSpell(this);" + onpopuphiding="this.parentNode.parentNode._doPopupItemDisabling(this);" + oncommand="var cmd = event.originalTarget.getAttribute('cmd'); if(cmd) { this.parentNode.parentNode.doTextCommand(cmd); event.stopPropagation(); }"> + oncommand="this.parentNode.parentNode.parentNode.spellCheckerUI.addToDictionary();"/> @@ -257,11 +258,16 @@ + oncommand="this.parentNode.parentNode.parentNode.spellCheckerUI.toggleEnabled();"/> - + + + +