Index: gc_lang/fr/mailext/content/spell_options.css ================================================================== --- gc_lang/fr/mailext/content/spell_options.css +++ gc_lang/fr/mailext/content/spell_options.css @@ -1,17 +1,17 @@ /* CSS */ #grouptitle { - font-size: 16px; - font-weight: bold; - color: hsl(0, 50%, 50%); + font-size: 16px; + font-weight: bold; + color: hsl(0, 50%, 50%); } .option { - font-size: 16px; - font-weight: bold; - color: hsl(210, 50%, 50%); + font-size: 16px; + font-weight: bold; + color: hsl(210, 50%, 50%); } .suboption { margin-left: 30px; font-size: 16px; @@ -21,26 +21,26 @@ .suboption2 { margin-left: 30px; } description { - width: 340px; + width: 340px; } .dicdescr { - margin-left: 27px; + margin-left: 27px; } .disabled { - opacity: .25; + opacity: .25; } .dialogheader-title { - margin: 5px; - padding: 5px 8px; - border: 1px solid hsl(210, 50%, 80%); - background-color: hsl(210, 50%, 50%); - color: hsl(210, 10%, 90%); - font-size: larger; - font-weight: bold; + margin: 5px; + padding: 5px 8px; + border: 1px solid hsl(210, 50%, 80%); + background-color: hsl(210, 50%, 50%); + color: hsl(210, 10%, 90%); + font-size: larger; + font-weight: bold; } Index: gc_lang/fr/mailext/content/spell_options.js ================================================================== --- gc_lang/fr/mailext/content/spell_options.js +++ gc_lang/fr/mailext/content/spell_options.js @@ -16,23 +16,21 @@ document.getElementById('grammalecte-spelloptions-window').centerWindowOnScreen(); // main spelling dictionary let sMainDicName = prefs.getCharPref('sMainDicName'); console.log("spelling dictionary:", sMainDicName); if (sMainDicName == "fr-classic.json") { - console.log("classic"); document.getElementById("classic").checked = true; } else if (sMainDicName == "fr-reform.json") { - console.log("reform"); document.getElementById("reform").checked = true; } else if (sMainDicName == "fr-allvars.json") { - console.log("allvars"); document.getElementById("allvars").checked = true; } // personal dictionary document.getElementById('personal_dic').checked = prefs.getBoolPref('bPersonalDictionary'); + // listen this.listen(); } catch (e) { console.error(e); } @@ -39,29 +37,40 @@ }, listen: function () { document.addEventListener("dialogaccept", (event) => { oDialogControl.setDictionaries(); }); + document.getElementById("classic").addEventListener("click", (event) => { + oDialogControl.changeMainDicUI("classic"); + }); + document.getElementById("reform").addEventListener("click", (event) => { + oDialogControl.changeMainDicUI("reform"); + }); + document.getElementById("allvars").addEventListener("click", (event) => { + oDialogControl.changeMainDicUI("allvars"); + }); + }, + changeMainDicUI (sDic) { + document.getElementById("classic").checked = ("classic" === sDic); + document.getElementById("reform").checked = ("reform" === sDic); + document.getElementById("allvars").checked = ("allvars" === sDic); }, setDictionaries: function () { //oSpellControl.init(); // main spelling dictionary - let sMainDicName; + let sMainDicName = ""; if (document.getElementById("classic").checked) { - console.log("classic"); sMainDicName = "fr-classic.json"; } else if (document.getElementById("reform").checked) { - console.log("reform"); sMainDicName = "fr-reform.json"; } else if (document.getElementById("allvars").checked) { - console.log("allvars"); sMainDicName = "fr-allvars.json"; } console.log("selected spelling dictionary:", sMainDicName); prefs.setCharPref("sMainDicName", sMainDicName); // personal dictionary let bActivate = document.getElementById('personal_dic').checked; prefs.setBoolPref("bPersonalDictionary", bActivate); } }; Index: gc_lang/fr/mailext/content/spell_options.xul ================================================================== --- gc_lang/fr/mailext/content/spell_options.xul +++ gc_lang/fr/mailext/content/spell_options.xul @@ -40,15 +40,20 @@ &warning_graphspell; &option.main_dic.descr;