diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
commit | 6bd66b1728eeddb058066edda740aaeb2ceaec23 (patch) | |
tree | 985faf01c526763515731569fa01a99f4dbef36e /toolkit/mozapps | |
parent | e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc (diff) | |
parent | 559824514dc95e02fbe81f1786e6ac13ee8e9d55 (diff) | |
download | UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.gz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.lz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.xz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.zip |
Merge branch 'master' into js-modules
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r-- | toolkit/mozapps/downloads/content/downloads.js | 10 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/content/newaddon.js | 7 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/jar.mn | 2 | ||||
-rw-r--r-- | toolkit/mozapps/handling/content/dialog.xul | 5 | ||||
-rw-r--r-- | toolkit/mozapps/handling/jar.mn | 2 | ||||
-rw-r--r-- | toolkit/mozapps/webextensions/jar.mn | 2 |
6 files changed, 17 insertions, 11 deletions
diff --git a/toolkit/mozapps/downloads/content/downloads.js b/toolkit/mozapps/downloads/content/downloads.js index 92a9f7593..2fdb19a74 100644 --- a/toolkit/mozapps/downloads/content/downloads.js +++ b/toolkit/mozapps/downloads/content/downloads.js @@ -7,7 +7,7 @@ // Globals 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 nsLocalFile = Components.Constructor("@mozilla.org/file/local;1", @@ -78,7 +78,6 @@ var gStr = { downloadsTitleFiles: "downloadsTitleFiles", downloadsTitlePercent: "downloadsTitlePercent", fileExecutableSecurityWarningTitle: "fileExecutableSecurityWarningTitle", - fileExecutableSecurityWarningDontAsk: "fileExecutableSecurityWarningDontAsk" }; // 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"]. getService(Ci.nsIPrefBranch); try { - dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN); + dontAsk = !pref.getBoolPref(PREF_BDM_CONFIRMOPENEXE); } catch (e) { } if (AppConstants.platform == "win") { @@ -273,16 +272,13 @@ function openDownload(aDownload) var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]); let title = gStr.fileExecutableSecurityWarningTitle; - let dontAsk = gStr.fileExecutableSecurityWarningDontAsk; var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); - var checkbox = { value: false }; - var open = promptSvc.confirmCheck(window, title, message, dontAsk, checkbox); + var open = promptSvc.confirm(window, title, message); if (!open) return; - pref.setBoolPref(PREF_BDM_ALERTONEXEOPEN, !checkbox.value); } } try { diff --git a/toolkit/mozapps/extensions/content/newaddon.js b/toolkit/mozapps/extensions/content/newaddon.js index b1ad5631b..79978a698 100644 --- a/toolkit/mozapps/extensions/content/newaddon.js +++ b/toolkit/mozapps/extensions/content/newaddon.js @@ -42,7 +42,10 @@ function initialize() { // If the add-on doesn't exist or it is already enabled or it has already // been seen or it cannot be enabled then this UI is useless, just close it. // This shouldn't normally happen unless session restore restores the tab. - if (!aAddon || !aAddon.userDisabled || aAddon.seen || + if (!aAddon || !aAddon.userDisabled || +#ifdef MOZ_WEBEXTENSIONS + aAddon.seen || +#endif !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE)) { window.close(); return; @@ -79,6 +82,7 @@ function initialize() { document.getElementById("location").hidden = true; } +#ifdef MOZ_WEBEXTENSIONS // Only mark the add-on as seen if the page actually gets focus if (document.hasFocus()) { aAddon.markAsSeen(); @@ -86,6 +90,7 @@ function initialize() { else { document.addEventListener("focus", () => aAddon.markAsSeen(), false); } +#endif var event = document.createEvent("Events"); event.initEvent("AddonDisplayed", true, true); diff --git a/toolkit/mozapps/extensions/jar.mn b/toolkit/mozapps/extensions/jar.mn index e95d93ca0..c4d8874c9 100644 --- a/toolkit/mozapps/extensions/jar.mn +++ b/toolkit/mozapps/extensions/jar.mn @@ -26,7 +26,7 @@ toolkit.jar: content/mozapps/extensions/eula.xul (content/eula.xul) content/mozapps/extensions/eula.js (content/eula.js) content/mozapps/extensions/newaddon.xul (content/newaddon.xul) - content/mozapps/extensions/newaddon.js (content/newaddon.js) +* content/mozapps/extensions/newaddon.js (content/newaddon.js) content/mozapps/extensions/setting.xml (content/setting.xml) content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul) content/mozapps/extensions/gmpPrefs.xul (content/gmpPrefs.xul) diff --git a/toolkit/mozapps/handling/content/dialog.xul b/toolkit/mozapps/handling/content/dialog.xul index f73ce6d7f..2e2dab4e4 100644 --- a/toolkit/mozapps/handling/content/dialog.xul +++ b/toolkit/mozapps/handling/content/dialog.xul @@ -45,8 +45,13 @@ <description id="remember-text"/> <hbox class="dialog-button-box" pack="end"> +#ifdef XP_WIN + <button dlgtype="accept" label="&accept;" icon="open" class="dialog-button"/> + <button dlgtype="cancel" icon="cancel" class="dialog-button"/> +#else <button dlgtype="cancel" icon="cancel" class="dialog-button"/> <button dlgtype="accept" label="&accept;" icon="open" class="dialog-button"/> +#endif </hbox> </dialog> diff --git a/toolkit/mozapps/handling/jar.mn b/toolkit/mozapps/handling/jar.mn index d6225ecca..8c338a0db 100644 --- a/toolkit/mozapps/handling/jar.mn +++ b/toolkit/mozapps/handling/jar.mn @@ -6,5 +6,5 @@ toolkit.jar: % content mozapps %content/mozapps/ content/mozapps/handling/handler.css (content/handler.css) content/mozapps/handling/handler.xml (content/handler.xml) - content/mozapps/handling/dialog.xul (content/dialog.xul) +* content/mozapps/handling/dialog.xul (content/dialog.xul) content/mozapps/handling/dialog.js (content/dialog.js) diff --git a/toolkit/mozapps/webextensions/jar.mn b/toolkit/mozapps/webextensions/jar.mn index ad3c45710..0c63396cc 100644 --- a/toolkit/mozapps/webextensions/jar.mn +++ b/toolkit/mozapps/webextensions/jar.mn @@ -23,7 +23,7 @@ toolkit.jar: content/mozapps/extensions/eula.xul (../extensions/content/eula.xul) content/mozapps/extensions/eula.js (content/eula.js) content/mozapps/extensions/newaddon.xul (content/newaddon.xul) - content/mozapps/extensions/newaddon.js (../extensions/content/newaddon.js) +* content/mozapps/extensions/newaddon.js (../extensions/content/newaddon.js) content/mozapps/extensions/pluginPrefs.xul (../extensions/content/pluginPrefs.xul) content/mozapps/extensions/gmpPrefs.xul (../extensions/content/gmpPrefs.xul) content/mozapps/extensions/OpenH264-license.txt (../extensions/content/OpenH264-license.txt) |