MozillaThunderbird/thunderbird-no-update.patch

29 lines
1.4 KiB
Diff

diff --git a/mail/base/content/utilityOverlay.js b/mail/base/content/utilityOverlay.js
--- a/mail/base/content/utilityOverlay.js
+++ b/mail/base/content/utilityOverlay.js
@@ -237,7 +237,13 @@ function buildHelpMenu()
// administrator or if we cannot update for some other reason.
var checkForUpdates = document.getElementById("checkForUpdates");
var canUpdate = updates.canUpdate;
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var updateEnabled = prefs.getBoolPref("app.update.enabled", true);
checkForUpdates.setAttribute("disabled", !canUpdate);
+ checkForUpdates.setAttribute("hidden", !canUpdate || !updateEnabled);
+ var updateSeparator = document.getElementById("menu_HelpAfterUpdatesSeparator");
+ updateSeparator.setAttribute("hidden", !canUpdate || !updateEnabled);
if (!canUpdate)
return;
diff --git a/mail/components/preferences/advanced.js b/mail/components/preferences/advanced.js
--- a/mail/components/preferences/advanced.js
+++ b/mail/components/preferences/advanced.js
@@ -238,6 +238,7 @@ var gAdvancedPane = {
var enableAppUpdate = document.getElementById("enableAppUpdate");
enableAppUpdate.disabled = !aus.canUpdate || enabledPref.locked;
+ enableAppUpdate.hidden = !aus.canUpdate || !enabledPref.value;
},
updateAutoItems: function ()