mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
[Pale-Moon] Issue MoonchildProductions/UXP#1360 - Pale Moon front-end changes
- Move some options around, group HWA together, and add localization strings for proper display.
This commit is contained in:
parent
34a4c07937
commit
0dae8965e5
4 changed files with 48 additions and 10 deletions
|
|
@ -1198,7 +1198,7 @@ BrowserGlue.prototype = {
|
|||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 21;
|
||||
const UI_VERSION = 22;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
|
|
@ -1452,6 +1452,19 @@ BrowserGlue.prototype = {
|
|||
} catch(e) { }
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 22) {
|
||||
if (Services.prefs.prefHasUserValue("layers.acceleration.disabled")) {
|
||||
let HWADisabled = Service.prefs.getBoolPref("layers.acceleration.disabled");
|
||||
Services.prefs.setBoolPref("layers.acceleration.enabled") = !HWADisabled;
|
||||
Services.prefs.setBoolPref("gfx.direct2d.disabled") = HWADisabled;
|
||||
}
|
||||
if (Services.prefs.getBoolPref("layers.acceleration.force-enabled", false)) {
|
||||
Services.prefs.setBoolPref("layers.acceleration.force", true);
|
||||
}
|
||||
Services.prefs.clearUserPref("layers.acceleration.disabled");
|
||||
Services.prefs.clearUserPref("layers.acceleration.force-enabled");
|
||||
}
|
||||
|
||||
// Clear out dirty storage
|
||||
if (this._dirty)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ var gAdvancedPane = {
|
|||
this.updateActualCacheSize();
|
||||
this.updateActualAppCacheSize();
|
||||
|
||||
this.updateHWADisplay();
|
||||
|
||||
// Notify observers that the UI is now ready
|
||||
Services.obs.notifyObservers(window, "advanced-pane-loaded", null);
|
||||
},
|
||||
|
|
@ -156,12 +158,21 @@ var gAdvancedPane = {
|
|||
updateHardwareAcceleration: function()
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
var fromPref = document.getElementById("layers.acceleration.disabled");
|
||||
var fromPref = document.getElementById("layers.acceleration.enabled");
|
||||
var toPref = document.getElementById("gfx.direct2d.disabled");
|
||||
toPref.value = fromPref.value;
|
||||
toPref.value = !fromPref.value;
|
||||
#endif
|
||||
this.updateHWADisplay();
|
||||
},
|
||||
|
||||
updateHWADisplay: function()
|
||||
{
|
||||
#ifdef XP_LINUX
|
||||
let HWA = document.getElementById("layers.acceleration.enabled");
|
||||
document.getElementById("forceHWAccel").disabled = !HWA.value;
|
||||
#endif
|
||||
},
|
||||
|
||||
// DATA CHOICES TAB
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<preference id="general.autoScroll" name="general.autoScroll" type="bool"/>
|
||||
<preference id="general.smoothScroll" name="general.smoothScroll" type="bool"/>
|
||||
<preference id="layers.acceleration.disabled" name="layers.acceleration.disabled" type="bool" inverted="true"
|
||||
<preference id="layers.acceleration.enabled" name="layers.acceleration.enabled" type="bool"
|
||||
onchange="gAdvancedPane.updateHardwareAcceleration()"/>
|
||||
#ifdef XP_WIN
|
||||
<preference id="gfx.direct2d.disabled" name="gfx.direct2d.disabled" type="bool" inverted="true"/>
|
||||
|
|
@ -152,10 +152,6 @@
|
|||
label="&useAutoScroll.label;"
|
||||
accesskey="&useAutoScroll.accesskey;"
|
||||
preference="general.autoScroll"/>
|
||||
<checkbox id="allowHWAccel"
|
||||
label="&allowHWAccel.label;"
|
||||
accesskey="&allowHWAccel.accesskey;"
|
||||
preference="layers.acceleration.disabled"/>
|
||||
<checkbox id="checkSpelling"
|
||||
label="&checkSpelling.label;"
|
||||
accesskey="&checkSpelling.accesskey;"
|
||||
|
|
@ -164,6 +160,21 @@
|
|||
preference="layout.spellcheckDefault"/>
|
||||
</groupbox>
|
||||
|
||||
<!-- Hardware Acceleration -->
|
||||
<groupbox id="browsingGroup" align="start">
|
||||
<caption label="&HWAccel.label;"/>
|
||||
<label>&restartRequired.label;</label>
|
||||
<checkbox id="allowHWAccel"
|
||||
label="&allowHWAccel.label;"
|
||||
accesskey="&allowHWAccel.accesskey;"
|
||||
preference="layers.acceleration.enabled"/>
|
||||
#ifdef XP_LINUX
|
||||
<checkbox id="forceHWAccel" class="indent"
|
||||
label="&forceHWAccel.label;"
|
||||
preference="layers.acceleration.force"/>
|
||||
#endif
|
||||
</groupbox>
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
<!-- System Defaults -->
|
||||
<groupbox id="systemDefaultsGroup" orient="vertical">
|
||||
|
|
|
|||
|
|
@ -21,10 +21,13 @@
|
|||
<!ENTITY useAutoScroll.accesskey "a">
|
||||
<!ENTITY useSmoothScrolling.label "Use smooth scrolling">
|
||||
<!ENTITY useSmoothScrolling.accesskey "m">
|
||||
<!ENTITY allowHWAccel.label "Use hardware acceleration when available">
|
||||
<!ENTITY allowHWAccel.accesskey "r">
|
||||
<!ENTITY checkSpelling.label "Check my spelling as I type">
|
||||
<!ENTITY checkSpelling.accesskey "t">
|
||||
<!ENTITY HWAccel.label "Hardware Acceleration (HWA)">
|
||||
<!ENTITY restartRequired.label "Changes to these settings require a browser restart.">
|
||||
<!ENTITY allowHWAccel.label "Use hardware acceleration when available">
|
||||
<!ENTITY allowHWAccel.accesskey "r">
|
||||
<!ENTITY forceHWAccel.label "Force hardware acceleration">
|
||||
|
||||
<!ENTITY systemDefaults.label "System Defaults">
|
||||
<!ENTITY alwaysCheckDefault.label "Always check to see if &brandShortName; is the default browser on startup"><!--XXX-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue