зеркало из https://github.com/mozilla/pjs.git
Bug 344368 - There should be a way to change spell checker settings in the options panel. ui=beltzner, r=mconnor
This commit is contained in:
Родитель
4e2db1ccb8
Коммит
72c19ceb15
|
@ -91,8 +91,43 @@ var gAdvancedPane = {
|
|||
* general.smoothScroll
|
||||
* - set to true to enable finer page scrolling than line-by-line on page-up,
|
||||
* page-down, and other such page movements
|
||||
* layout.spellcheckDefault
|
||||
* - an integer:
|
||||
* 0 disables spellchecking
|
||||
* 1 enables spellchecking, but only for multiline text fields
|
||||
* 2 enables spellchecking for all text fields
|
||||
*/
|
||||
|
||||
/**
|
||||
* Stores the original value of the spellchecking preference to enable proper
|
||||
* restoration if unchanged (since we're mapping a tristate onto a checkbox).
|
||||
*/
|
||||
_storedSpellCheck: 0,
|
||||
|
||||
/**
|
||||
* Returns true if any spellchecking is enabled and false otherwise, caching
|
||||
* the current value to enable proper pref restoration if the checkbox is
|
||||
* never changed.
|
||||
*/
|
||||
readCheckSpelling: function ()
|
||||
{
|
||||
var pref = document.getElementById("layout.spellcheckDefault");
|
||||
this._storedSpellCheck = pref.value;
|
||||
|
||||
return (pref.value != 0);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the value of the spellchecking preference represented by UI,
|
||||
* preserving the preference's "hidden" value if the preference is
|
||||
* unchanged and represents a value not strictly allowed in UI.
|
||||
*/
|
||||
writeCheckSpelling: function ()
|
||||
{
|
||||
var checkbox = document.getElementById("checkSpelling");
|
||||
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows a dialog in which the preferred language for web content may be set.
|
||||
*/
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
<preference id="general.autoScroll" name="general.autoScroll" type="bool"/>
|
||||
<preference id="general.smoothScroll" name="general.smoothScroll" type="bool"/>
|
||||
<preference id="layout.spellcheckDefault" name="layout.spellcheckDefault" type="int"/>
|
||||
|
||||
|
||||
<!-- Network tab -->
|
||||
|
@ -154,6 +155,12 @@
|
|||
label="&useSmoothScrolling.label;"
|
||||
accesskey="&useSmoothScrolling.accesskey;"
|
||||
preference="general.smoothScroll"/>
|
||||
<checkbox id="checkSpelling"
|
||||
label="&checkSpelling.label;"
|
||||
accesskey="&checkSpelling.accesskey;"
|
||||
onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
|
||||
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
||||
preference="layout.spellcheckDefault"/>
|
||||
</groupbox>
|
||||
|
||||
<!-- Languages -->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Note: due to bug 143065, the only remaining accesskeys available to be used
|
||||
in the Advanced pane are: "b", "i", "j", "q", "z" -->
|
||||
in the Advanced pane are: "b", "j", "q", "z" -->
|
||||
|
||||
<!ENTITY generalTab.label "General">
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
|||
<!ENTITY useAutoScroll.accesskey "a">
|
||||
<!ENTITY useSmoothScrolling.label "Use smooth scrolling">
|
||||
<!ENTITY useSmoothScrolling.accesskey "m">
|
||||
<!ENTITY checkSpelling.label "Check my spelling as I type">
|
||||
<!ENTITY checkSpelling.accesskey "t">
|
||||
|
||||
<!ENTITY languages.label "Languages">
|
||||
|
||||
|
@ -77,12 +79,12 @@
|
|||
<!ENTITY certs.auto "Select one automatically">
|
||||
<!ENTITY certs.auto.accesskey "l">
|
||||
<!ENTITY certs.ask "Ask me every time">
|
||||
<!ENTITY certs.ask.accesskey "t">
|
||||
<!ENTITY certs.ask.accesskey "i">
|
||||
<!ENTITY viewCerts.label "View Certificates">
|
||||
<!ENTITY viewCerts.accesskey "V">
|
||||
<!ENTITY viewCRLs.label "Revocation Lists">
|
||||
<!ENTITY viewCRLs.accesskey "R">
|
||||
<!ENTITY verify.label "Verification">
|
||||
<!ENTITY verify.accesskey "i">
|
||||
<!ENTITY verify.accesskey "n">
|
||||
<!ENTITY viewSecurityDevices.label "Security Devices">
|
||||
<!ENTITY viewSecurityDevices.accesskey "y">
|
||||
|
|
Загрузка…
Ссылка в новой задаче