Bug 759158 - Introduce accessibility status to about:support. r=gavin

This commit is contained in:
David Bolter 2012-06-27 11:47:27 -04:00
parent e1d2cea11f
commit 41fde0e18a
3 changed files with 36 additions and 0 deletions

View File

@ -95,6 +95,7 @@ window.onload = function () {
populateExtensionsSection();
populateGraphicsSection();
populateJavaScriptSection();
populateAccessibilitySection();
populateLibVersionsSection();
}
@ -404,6 +405,20 @@ function populateJavaScriptSection() {
document.getElementById("javascript-incremental-gc").textContent = enabled ? "1" : "0";
}
function populateAccessibilitySection() {
var active;
try {
active = Components.manager.QueryInterface(Ci.nsIServiceManager)
.isServiceInstantiatedByContractID(
"@mozilla.org/accessibilityService;1",
Ci.nsISupports);
} catch (ex) {
active = false;
}
document.getElementById("a11y-activated").textContent = active ? "1" : "0";
}
function getPrefValue(aName) {
let value = "";
let type = Services.prefs.getPrefType(aName);

View File

@ -239,6 +239,24 @@
</tbody>
</table>
<!-- - - - - - - - - - - - - - - - - - - - - -->
<h2 class="major-section">
&aboutSupport.a11yTitle;
</h2>
<table>
<tbody>
<tr>
<th class="column">
&aboutSupport.a11yActivated;
</th>
<td id="a11y-activated">
</td>
</tr>
</tbody>
</table>
<!-- - - - - - - - - - - - - - - - - - - - - -->
<h2 class="major-section">
&aboutSupport.libraryVersionsTitle;

View File

@ -51,6 +51,9 @@ variant of aboutSupport.showDir.label. -->
<!ENTITY aboutSupport.jsTitle "JavaScript">
<!ENTITY aboutSupport.jsIncrementalGC "Incremental GC">
<!ENTITY aboutSupport.a11yTitle "Accessibility">
<!ENTITY aboutSupport.a11yActivated "Activated">
<!ENTITY aboutSupport.libraryVersionsTitle "Library Versions">
<!ENTITY aboutSupport.installationHistoryTitle "Installation History">