(Navigator) Use a link label instead of a menu item to download more dicts

The previous setup failed to ensure that the menu item and preference did not return to a valid state and is very non-standard.. Opening a webpage from a dropdown list.. Fuck that shit.
This commit is contained in:
Matt A. Tobin
2021-01-18 14:30:25 -05:00
committed by Roy Tam
parent f5d456a622
commit 36d400a350
2 changed files with 7 additions and 9 deletions
@@ -188,11 +188,5 @@ function InitLanguageMenu() {
}
function SelectLanguage(aTarget) {
if (aTarget.value != "more-cmd")
gLastSelectedLang = aTarget;
else {
openDictionaryList();
if (gLastSelectedLang)
document.getElementById("languageMenuList").selectedItem = gLastSelectedLang;
}
gLastSelectedLang = aTarget;
}
@@ -150,8 +150,7 @@
preference="spellchecker.dictionary">
<menupopup onpopupshowing="InitLanguageMenu();">
<!-- dynamic content populated by JS -->
<menuseparator/>
<menuitem value="more-cmd" label="&moreDictionaries.label;"/>
<menuseparator hidden="true"/>
</menupopup>
</menulist>
<spring flex="1"/>
@@ -170,6 +169,11 @@
</menupopup>
</menulist>
</hbox>
<separator class="thin"/>
<label id="moreDictionaries"
class="text-link"
value="&moreDictionaries.label;"
onclick="openDictionaryList()"/>
</groupbox>
<vbox class="box-padded" align="start">