add:   if (gPrefBranch && gPrefBranch.prefIsLocked(setting)) { checkbox.disabled = true; } 
context: function Startup() {    // Get globals.    var settings = parent.winHooks.settings;    var winhooks = parent.winHooks.winhooks;    var prefs    = parent.winHooks.prefs;    if ( !winhooks ) {        // Get component service.        try {            winhooks = Components.classes[ "@mozilla.org/winhooks;1" ].getService( Components.interfaces.nsIWindowsHooks );            if ( winhooks ) {                // Try to get preferences.                prefs = winhooks.settings;                // Set globals.                parent.winHooks.winhooks = winhooks;                parent.winHooks.prefs    = prefs;                // Register so we get called when pref window Ok is pressed.                parent.hPrefWindow.registerOKCallbackFunc( onOK );            }        }        catch(e) {            dump( e + "\n" );        }    }             // Transfer object settings to the dialog checkboxes.    for( var index in settings  ) {        var setting = settings[ index ];        var checkbox = document.getElementById( setting );        if ( checkbox && prefs[ setting ] ) {            checkbox.setAttribute( "checked", "true" );        }    }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5cf54ef5227fc96cff8f2937779675bc218ed839/pref-winhooks.js/buggy/suite/common/pref/pref-winhooks.js