Grammalecte  Diff

Differences From Artifact [9ebffece09]:

To Artifact [f3284c0323]:


14
15
16
17
18
19
20



21
22
23
24

25
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49


50

	Services.console.logStringMessage(args.join(" -- ") + "\n");
}


var oDialogControl = {
	load: function () {
		try {



			document.getElementById('fr-FR-modern').checked = prefs.getBoolPref('bDictModern');
			document.getElementById('fr-FR-classic').checked = prefs.getBoolPref('bDictClassic');
			document.getElementById('fr-FR-reform').checked = prefs.getBoolPref('bDictReform');
			document.getElementById('fr-FR-classic-reform').checked = prefs.getBoolPref('bDictClassicReform');

			document.getElementById('grammalecte-spelloptions-window').centerWindowOnScreen();
		}
		catch (e) {
			Cu.reportError(e);
		}
	},
	setDictionaries: function () {
		oSpellControl.init();

		this._setDictionary('fr-FR-modern', 'bDictModern');
		this._setDictionary('fr-FR-classic', 'bDictClassic');
		this._setDictionary('fr-FR-reform', 'bDictReform');
		this._setDictionary('fr-FR-classic-reform', 'bDictClassicReform');
	},
	_setDictionary: function (sDicName, sOptName) {
		try {
			let bActivate = document.getElementById(sDicName).checked;
			oSpellControl.setExtensionDictFolder(sDicName, bActivate);
			prefs.setBoolPref(sOptName, bActivate);
		}
		catch (e) {
			Cu.reportError(e);
		}
	}
};












>
>
>




>








>
|
|
|
|

|








|
<
|
>
>
|
>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

53
54
55
56
57
	Services.console.logStringMessage(args.join(" -- ") + "\n");
}


var oDialogControl = {
	load: function () {
		try {
			// Graphspell dictionaries
			document.getElementById('personal_dic').checked = prefs.getBoolPref('bPersonalDictionary');
			// Hunspell dictionaries
			document.getElementById('fr-FR-modern').checked = prefs.getBoolPref('bDictModern');
			document.getElementById('fr-FR-classic').checked = prefs.getBoolPref('bDictClassic');
			document.getElementById('fr-FR-reform').checked = prefs.getBoolPref('bDictReform');
			document.getElementById('fr-FR-classic-reform').checked = prefs.getBoolPref('bDictClassicReform');
			// center window
			document.getElementById('grammalecte-spelloptions-window').centerWindowOnScreen();
		}
		catch (e) {
			Cu.reportError(e);
		}
	},
	setDictionaries: function () {
		oSpellControl.init();
		this._setGraphspellDictionaries();
		this._setHunspellDictionary('fr-FR-modern', 'bDictModern');
		this._setHunspellDictionary('fr-FR-classic', 'bDictClassic');
		this._setHunspellDictionary('fr-FR-reform', 'bDictReform');
		this._setHunspellDictionary('fr-FR-classic-reform', 'bDictClassicReform');
	},
	_setHunspellDictionary: function (sDicName, sOptName) {
		try {
			let bActivate = document.getElementById(sDicName).checked;
			oSpellControl.setExtensionDictFolder(sDicName, bActivate);
			prefs.setBoolPref(sOptName, bActivate);
		}
		catch (e) {
			Cu.reportError(e);
		}
	},

	_setGraphspellDictionaries: function () {
		let bActivate = document.getElementById('personal_dic').checked;
		prefs.setBoolPref("bPersonalDictionary", bActivate);
	}
};