add:    checkForUpdates.disabled = gPrefBranch.prefIsLocked("app.update.enabled"); 
context: function buildHelpMenu(){  var updates =       Components.classes["@mozilla.org/updates/update-service;1"].      getService(Components.interfaces.nsIApplicationUpdateService);  var um =       Components.classes["@mozilla.org/updates/update-manager;1"].      getService(Components.interfaces.nsIUpdateManager);  var activeUpdate = um.activeUpdate;  if (!gMessengerBundle)    gMessengerBundle = document.getElementById("bundle_messenger");    var label = gMessengerBundle.getString("updates_checkForUpdates");  if (activeUpdate)   {    if (updates.isDownloading)     {      if (activeUpdate.name)         label = gMessengerBundle.getFormattedString("updates_downloadingUpdates", [activeUpdate.name]);      else        label = gMessengerBundle.getString("updates_downloadingUpdatesFallback");    }    else     {      if (activeUpdate.name)         label = gMessengerBundle.getFormattedString("updates_resumeDownloading", [activeUpdate.name]);      else        label = gMessengerBundle.getString("updates_resumeDownloadingFallback");    }  }      var checkForUpdates = document.getElementById("checkForUpdates");  checkForUpdates.label = label;  if (um.activeUpdate && updates.isDownloading)    checkForUpdates.setAttribute("loading", "true");  else    checkForUpdates.removeAttribute("loading");}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/6e2262d10a0bfa5aff5d93ecaf96c47df05e0e20/mailWindowOverlay.js/buggy/mail/base/content/mailWindowOverlay.js