seamonkey-no-update.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Tue, 09 Feb 2010 11:16:29 +0100
changeset 1 371dfea907fd
parent 0 b71590debb98
permissions -rw-r--r--
Added Sunbird patches

diff --git a/suite/common/utilityOverlay.js b/suite/common/utilityOverlay.js
--- a/suite/common/utilityOverlay.js
+++ b/suite/common/utilityOverlay.js
@@ -671,7 +671,13 @@ function updateCheckUpdatesItem()
   // 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_HelpUpdatesSeparator");
+  updateSeparator.setAttribute("hidden", !canUpdate || !updateEnabled);
   if (!canUpdate)
     return;