Bug 1239748 - add a user-facing preference to turn off the on-screen keyboard functionality completely, r=jaws

--HG--
extra : commitid : 2k70EZR9a3L
extra : rebase_source : e2970230dae4f0eb01d7b96f7e5fa2dda7ab5564
This commit is contained in:
Gijs Kruitbosch 2016-01-20 15:44:03 +00:00
Родитель 438892c36a
Коммит 36e99ddea3
4 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -47,6 +47,7 @@ var gAdvancedPane = {
#ifdef MOZ_SERVICES_HEALTHREPORT
this.initSubmitHealthReport();
#endif
this.updateOnScreenKeyboardVisibility();
this.updateCacheSizeInputField();
this.updateActualCacheSize();
this.updateActualAppCacheSize();
@ -124,6 +125,10 @@ var gAdvancedPane = {
* - when set to true, typing outside text areas and input boxes will
* automatically start searching for what's typed within the current
* document; when set to false, no search action happens
* ui.osk.enabled
* - when set to true, subject to other conditions, we may sometimes invoke
* an on-screen keyboard when a text input is focused.
* (Currently Windows-only, and depending on prefs, may be Windows-8-only)
* general.autoScroll
* - when set to true, clicking the scroll wheel on the mouse activates a
* mouse mode where moving the mouse down scrolls the document downward with
@ -312,6 +317,15 @@ var gAdvancedPane = {
},
#endif
updateOnScreenKeyboardVisibility() {
if (AppConstants.platform == "win") {
let minVersion = Services.prefs.getBoolPref("ui.osk.require_win10") ? 10 : 6.2;
if (Services.vc.compare(Services.sysinfo.getProperty("version"), minVersion) >= 0) {
document.getElementById("useOnScreenKeyboard").hidden = false;
}
}
},
// NETWORK TAB
/*

Просмотреть файл

@ -22,6 +22,11 @@
<preference id="accessibility.blockautorefresh"
name="accessibility.blockautorefresh"
type="bool"/>
#ifdef XP_WIN
<preference id="ui.osk.enabled"
name="ui.osk.enabled"
type="bool"/>
#endif
<preference id="general.autoScroll"
name="general.autoScroll"
@ -147,6 +152,13 @@
<groupbox id="accessibilityGroup" align="start">
<caption><label>&accessibility.label;</label></caption>
#ifdef XP_WIN
<checkbox id="useOnScreenKeyboard"
hidden="true"
label="&useOnScreenKeyboard.label;"
accesskey="&useOnScreenKeyboard.accesskey;"
preference="ui.osk.enabled"/>
#endif
<checkbox id="useCursorNavigation"
label="&useCursorNavigation.label;"
accesskey="&useCursorNavigation.accesskey;"

Просмотреть файл

@ -11,6 +11,7 @@ var Cr = Components.results;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AppConstants.jsm");
var gLastHash = "";

Просмотреть файл

@ -14,6 +14,8 @@
<!ENTITY searchStartTyping.accesskey "x">
<!ENTITY blockAutoRefresh.label "Warn me when websites try to redirect or reload the page">
<!ENTITY blockAutoRefresh.accesskey "b">
<!ENTITY useOnScreenKeyboard.label "Show a touch keyboard when necessary">
<!ENTITY useOnScreenKeyboard.accesskey "k">
<!ENTITY browsing.label "Browsing">