mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +09:00
[PALEMOON] Reimplemented "Time Zone Information"
https://github.com/MoonchildProductions/Pale-Moon/issues/593 Issue #121
This commit is contained in:
parent
5e1f4eaae1
commit
93bf3b8b24
2 changed files with 40 additions and 0 deletions
|
|
@ -80,6 +80,14 @@ pref("browser.slowstartup.help.url", "http://www.palemoon.org/support/slowstartu
|
||||||
// on a network error page (e.g. cert error)
|
// on a network error page (e.g. cert error)
|
||||||
pref("browser.escape_to_blank", false);
|
pref("browser.escape_to_blank", false);
|
||||||
|
|
||||||
|
#ifdef XP_WIN
|
||||||
|
// Save internet zone information on downloaded files:
|
||||||
|
// 0 => Never
|
||||||
|
// 1 => Always
|
||||||
|
// 2 => Use system setting
|
||||||
|
pref("browser.download.saveZoneInformation", 2);
|
||||||
|
#endif
|
||||||
|
|
||||||
// The minimum delay in seconds for the timer to fire.
|
// The minimum delay in seconds for the timer to fire.
|
||||||
// default=2 minutes
|
// default=2 minutes
|
||||||
pref("app.update.timerMinimumDelay", 120);
|
pref("app.update.timerMinimumDelay", 120);
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,37 @@ this.DownloadIntegration = {
|
||||||
* @return true if files should be marked
|
* @return true if files should be marked
|
||||||
*/
|
*/
|
||||||
_shouldSaveZoneInformation() {
|
_shouldSaveZoneInformation() {
|
||||||
|
#ifdef MC_PALEMOON
|
||||||
|
let zonePref = 2;
|
||||||
|
try {
|
||||||
|
zonePref = Services.prefs.getIntPref("browser.download.saveZoneInformation");
|
||||||
|
} catch (ex) {}
|
||||||
|
|
||||||
|
switch (zonePref) {
|
||||||
|
case 0: // Never
|
||||||
|
return false;
|
||||||
|
case 1: // Always
|
||||||
|
return true;
|
||||||
|
case 2: // System-defined
|
||||||
|
let key = Cc["@mozilla.org/windows-registry-key;1"]
|
||||||
|
.createInstance(Ci.nsIWindowsRegKey);
|
||||||
|
try {
|
||||||
|
key.open(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
|
||||||
|
"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Attachments",
|
||||||
|
Ci.nsIWindowsRegKey.ACCESS_QUERY_VALUE);
|
||||||
|
try {
|
||||||
|
return key.readIntValue("SaveZoneInformation") != 1;
|
||||||
|
} finally {
|
||||||
|
key.close();
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
// If the key is not present, files should be marked by default.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default: // Invalid pref value defaults marking files.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#else
|
||||||
let key = Cc["@mozilla.org/windows-registry-key;1"]
|
let key = Cc["@mozilla.org/windows-registry-key;1"]
|
||||||
.createInstance(Ci.nsIWindowsRegKey);
|
.createInstance(Ci.nsIWindowsRegKey);
|
||||||
try {
|
try {
|
||||||
|
|
@ -545,6 +576,7 @@ this.DownloadIntegration = {
|
||||||
// If the key is not present, files should be marked by default.
|
// If the key is not present, files should be marked by default.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue