mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 14:17:30 +09:00
Clean up app strings and legacy download manager after e92808f0ebbeab3ffb79a0b1a4d190f61fb8b43a
This commit is contained in:
parent
d8992204e1
commit
a097c19df9
2 changed files with 3 additions and 11 deletions
|
|
@ -67,10 +67,6 @@ shortTimeLeftDays=%1$Sd
|
||||||
statusSeparator=%1$S \u2014 %2$S
|
statusSeparator=%1$S \u2014 %2$S
|
||||||
statusSeparatorBeforeNumber=%1$S \u2014 %2$S
|
statusSeparatorBeforeNumber=%1$S \u2014 %2$S
|
||||||
|
|
||||||
fileExecutableSecurityWarning="%S" is an executable file. Executable files may contain viruses or other malicious code that could harm your computer. Use caution when opening this file. Are you sure you want to launch "%S"?
|
|
||||||
fileExecutableSecurityWarningTitle=Open Executable File?
|
|
||||||
fileExecutableSecurityWarningDontAsk=Don't ask me this again
|
|
||||||
|
|
||||||
# LOCALIZATION NOTE (otherDownloads2):
|
# LOCALIZATION NOTE (otherDownloads2):
|
||||||
# This is displayed in an item at the bottom of the Downloads Panel when
|
# This is displayed in an item at the bottom of the Downloads Panel when
|
||||||
# there are more downloads than can fit in the list in the panel. Use a
|
# there are more downloads than can fit in the list in the panel. Use a
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
// Globals
|
// Globals
|
||||||
|
|
||||||
const PREF_BDM_CLOSEWHENDONE = "browser.download.manager.closeWhenDone";
|
const PREF_BDM_CLOSEWHENDONE = "browser.download.manager.closeWhenDone";
|
||||||
const PREF_BDM_ALERTONEXEOPEN = "browser.download.manager.alertOnEXEOpen";
|
const PREF_BDM_CONFIRMOPENEXE = "browser.download.confirmOpenExecutable";
|
||||||
const PREF_BDM_SCANWHENDONE = "browser.download.manager.scanWhenDone";
|
const PREF_BDM_SCANWHENDONE = "browser.download.manager.scanWhenDone";
|
||||||
|
|
||||||
const nsLocalFile = Components.Constructor("@mozilla.org/file/local;1",
|
const nsLocalFile = Components.Constructor("@mozilla.org/file/local;1",
|
||||||
|
|
@ -78,7 +78,6 @@ var gStr = {
|
||||||
downloadsTitleFiles: "downloadsTitleFiles",
|
downloadsTitleFiles: "downloadsTitleFiles",
|
||||||
downloadsTitlePercent: "downloadsTitlePercent",
|
downloadsTitlePercent: "downloadsTitlePercent",
|
||||||
fileExecutableSecurityWarningTitle: "fileExecutableSecurityWarningTitle",
|
fileExecutableSecurityWarningTitle: "fileExecutableSecurityWarningTitle",
|
||||||
fileExecutableSecurityWarningDontAsk: "fileExecutableSecurityWarningDontAsk"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// The statement to query for downloads that are active or match the search
|
// The statement to query for downloads that are active or match the search
|
||||||
|
|
@ -251,7 +250,7 @@ function openDownload(aDownload)
|
||||||
var pref = Cc["@mozilla.org/preferences-service;1"].
|
var pref = Cc["@mozilla.org/preferences-service;1"].
|
||||||
getService(Ci.nsIPrefBranch);
|
getService(Ci.nsIPrefBranch);
|
||||||
try {
|
try {
|
||||||
dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN);
|
dontAsk = !pref.getBoolPref(PREF_BDM_CONFIRMOPENEXE);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
|
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
|
|
@ -273,16 +272,13 @@ function openDownload(aDownload)
|
||||||
var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);
|
var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);
|
||||||
|
|
||||||
let title = gStr.fileExecutableSecurityWarningTitle;
|
let title = gStr.fileExecutableSecurityWarningTitle;
|
||||||
let dontAsk = gStr.fileExecutableSecurityWarningDontAsk;
|
|
||||||
|
|
||||||
var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"].
|
var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"].
|
||||||
getService(Ci.nsIPromptService);
|
getService(Ci.nsIPromptService);
|
||||||
var checkbox = { value: false };
|
var open = promptSvc.confirm(window, title, message);
|
||||||
var open = promptSvc.confirmCheck(window, title, message, dontAsk, checkbox);
|
|
||||||
|
|
||||||
if (!open)
|
if (!open)
|
||||||
return;
|
return;
|
||||||
pref.setBoolPref(PREF_BDM_ALERTONEXEOPEN, !checkbox.value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue