Index: gc_core/py/oxt/helpers.py ================================================================== --- gc_core/py/oxt/helpers.py +++ gc_core/py/oxt/helpers.py @@ -19,12 +19,11 @@ from apso_utils import console console() except: try: xContext = uno.getComponentContext() - xSvMgr = xContext.getServiceManager() - xPathSettings = xSvMgr.createInstanceWithContext("com.sun.star.util.PathSettings", xContext) + xPathSettings = xContext.ServiceManager.createInstanceWithContext("com.sun.star.util.PathSettings", xContext) spPyInstallion = uno.fileUrlToSystemPath(xPathSettings.Module) subprocess.Popen(spPyInstallion + os.sep + "python") # Start Python interactive Shell except: traceback.print_exc() Index: gc_lang/fr/mailext/content/overlay.js ================================================================== --- gc_lang/fr/mailext/content/overlay.js +++ gc_lang/fr/mailext/content/overlay.js @@ -42,10 +42,18 @@ let xPromise = this.xGCEWorker.post('loadGrammarChecker', [prefs.getCharPref("sGCOptions"), "Thunderbird"]); xPromise.then( function (aVal) { console.log(aVal); prefs.setCharPref("sGCOptions", aVal); + // spelling dictionary + if (prefs.getCharPref("sMainDicName")) { + let sMainDicName = prefs.getCharPref("sMainDicName"); + if (sMainDicName == "fr-classic.json" || sMainDicName == "fr-reform.json") { + that.xGCEWorker.post("setDictionary", ["main", sMainDicName]); + } + } + // personal dictionary if (prefs.getBoolPref("bPersonalDictionary")) { let sDicJSON = oFileHandler.loadFile("fr.personal.json"); if (sDicJSON) { that.xGCEWorker.post('setDictionary', ["personal", sDicJSON]); } 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 @@ -9,10 +9,20 @@ .option { font-size: 16px; font-weight: bold; color: hsl(210, 50%, 50%); } + +.suboption { + margin-left: 30px; + font-size: 16px; + font-weight: bold; + color: hsl(210, 50%, 50%); +} +.suboption2 { + margin-left: 30px; +} description { width: 340px; } 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 @@ -12,11 +12,26 @@ var oDialogControl = { load: function () { try { // center window document.getElementById('grammalecte-spelloptions-window').centerWindowOnScreen(); - // Graphspell dictionaries + // 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'); this.listen(); } catch (e) { console.error(e); @@ -26,13 +41,27 @@ document.addEventListener("dialogaccept", (event) => { oDialogControl.setDictionaries(); }); }, setDictionaries: function () { - oSpellControl.init(); - this._setGraphspellDictionaries(); - }, - _setGraphspellDictionaries: function () { + //oSpellControl.init(); + // main spelling dictionary + 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 @@ -8,11 +8,11 @@ id="grammalecte-spelloptions-window" title="&window.title;" orient="vertical" buttons="accept,cancel" width="400" - height="300" + height="330" onload="oDialogControl.load();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> @@ -39,10 +39,16 @@