mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804430 - Added list of whitelisted locked prefs to about:support. r=Unfocused
This commit is contained in:
parent
bfbff39fa3
commit
27ba2c13df
@ -148,6 +148,17 @@ let snapshotFormatters = {
|
||||
));
|
||||
},
|
||||
|
||||
lockedPreferences: function lockedPreferences(data) {
|
||||
$.append($("locked-prefs-tbody"), sortedArrayFromObject(data).map(
|
||||
function ([name, value]) {
|
||||
return $.new("tr", [
|
||||
$.new("td", name, "pref-name"),
|
||||
$.new("td", String(value).substr(0, 120), "pref-value"),
|
||||
]);
|
||||
}
|
||||
));
|
||||
},
|
||||
|
||||
graphics: function graphics(data) {
|
||||
// graphics-info-properties tbody
|
||||
if ("info" in data) {
|
||||
|
@ -263,6 +263,27 @@
|
||||
<p>&aboutSupport.userJSDescription;</p>
|
||||
</section>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.lockedKeyPrefsTitle;
|
||||
</h2>
|
||||
|
||||
<table class="prefs-table">
|
||||
<thead class="no-copy">
|
||||
<th class="name">
|
||||
&aboutSupport.lockedPrefsName;
|
||||
</th>
|
||||
|
||||
<th class="value">
|
||||
&aboutSupport.lockedPrefsValue;
|
||||
</th>
|
||||
</thead>
|
||||
|
||||
<tbody id="locked-prefs-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.jsTitle;
|
||||
|
@ -71,6 +71,10 @@ variant of aboutSupport.showDir.label. -->
|
||||
<!ENTITY aboutSupport.userJSTitle "user.js Preferences">
|
||||
<!ENTITY aboutSupport.userJSDescription "Your profile folder contains a <a id='prefs-user-js-link'>user.js file</a>, which includes preferences that were not created by &brandShortName;.">
|
||||
|
||||
<!ENTITY aboutSupport.lockedKeyPrefsTitle "Important Locked Preferences">
|
||||
<!ENTITY aboutSupport.lockedPrefsName "Name">
|
||||
<!ENTITY aboutSupport.lockedPrefsValue "Value">
|
||||
|
||||
<!ENTITY aboutSupport.graphicsTitle "Graphics">
|
||||
|
||||
<!ENTITY aboutSupport.jsTitle "JavaScript">
|
||||
|
@ -214,6 +214,27 @@ let dataProviders = {
|
||||
}, {}));
|
||||
},
|
||||
|
||||
lockedPreferences: function lockedPreferences(done) {
|
||||
function getPref(name) {
|
||||
let table = {};
|
||||
table[Ci.nsIPrefBranch.PREF_STRING] = "getCharPref";
|
||||
table[Ci.nsIPrefBranch.PREF_INT] = "getIntPref";
|
||||
table[Ci.nsIPrefBranch.PREF_BOOL] = "getBoolPref";
|
||||
let type = Services.prefs.getPrefType(name);
|
||||
if (!(type in table))
|
||||
throw new Error("Unknown preference type " + type + " for " + name);
|
||||
return Services.prefs[table[type]](name);
|
||||
}
|
||||
done(PREFS_WHITELIST.reduce(function (prefs, branch) {
|
||||
Services.prefs.getChildList(branch).forEach(function (name) {
|
||||
if (Services.prefs.prefIsLocked(name) &&
|
||||
!PREFS_BLACKLIST.some(function (re) re.test(name)))
|
||||
prefs[name] = getPref(name);
|
||||
});
|
||||
return prefs;
|
||||
}, {}));
|
||||
},
|
||||
|
||||
graphics: function graphics(done) {
|
||||
function statusMsgForFeature(feature) {
|
||||
// We return an array because in the tryNewerDriver case we need to
|
||||
|
Loading…
Reference in New Issue
Block a user