rem:  var entry = gPrefView[view.selection.currentIndex]; var isLocked = gPrefBranch.prefIsLocked(entry.prefCol); document.getElementById("lockSelected").hidden = isLocked; document.getElementById("unlockSelected").hidden = !isLocked; 
add:  document.getElementById("lockSelected").hidden = !prefSelected || isLocked; document.getElementById("unlockSelected").hidden = !prefSelected || !isLocked; 
context: function updateContextMenu(){  var lockCol = PREF_IS_LOCKED;  var typeCol = nsIPrefBranch.PREF_STRING;  var valueCol = "";  var copyDisabled = true;  if (view.selection.currentIndex >= 0) {    var prefRow = gPrefView[view.selection.currentIndex];    lockCol = prefRow.lockCol;    typeCol = prefRow.typeCol;    valueCol = prefRow.valueCol;    copyDisabled = false;  }  var copyPref = document.getElementById("copyPref");  copyPref.setAttribute("disabled", copyDisabled);  var copyName = document.getElementById("copyName");  copyName.setAttribute("disabled", copyDisabled);  var copyValue = document.getElementById("copyValue");  copyValue.setAttribute("disabled", copyDisabled);  var resetSelected = document.getElementById("resetSelected");  resetSelected.setAttribute("disabled", lockCol != PREF_IS_USER_SET);  var canToggle = typeCol == nsIPrefBranch.PREF_BOOL && valueCol != "";  var modifySelected = document.getElementById("modifySelected");  modifySelected.setAttribute("disabled", lockCol == PREF_IS_LOCKED);  modifySelected.hidden = canToggle;  var toggleSelected = document.getElementById("toggleSelected");  toggleSelected.setAttribute("disabled", lockCol == PREF_IS_LOCKED);  toggleSelected.hidden = !canToggle;    var entry = gPrefView[view.selection.currentIndex];  var isLocked = gPrefBranch.prefIsLocked(entry.prefCol);  document.getElementById("lockSelected").hidden = isLocked;  document.getElementById("unlockSelected").hidden = !isLocked;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/a5f42d48cde56b12f1d6f1b2c991f297d03dd67b/config.js/buggy/toolkit/components/viewconfig/content/config.js