add: if ( !settings ) {   settings = parent.winHooks.settings = [ "isHandlingHTML", "isHandlingJPEG", "isHandlingGIF", "isHandlingPNG", "isHandlingMNG", "isHandlingBMP", "isHandlingICO", "isHandlingXML", "isHandlingXHTML", "isHandlingXUL", "isHandlingHTTP", "isHandlingHTTPS", "isHandlingFTP", "isHandlingCHROME", "isHandlingGOPHER", "showDialog" ];  parent.hPrefWindow.registerOKCallbackFunc( onOK ); } 
context: function Startup() {    const prefbase = "system.windows.lock_ui.";    // initialise preference component.    // While the data is coming from the system registry, we use a set    // of parallel preferences to indicate if the ui should be locked.    if (!gPrefService) {        gPrefService = Components.classes["@mozilla.org/preferences-service;1"];        gPrefService = gPrefService.getService();        gPrefService = gPrefService.QueryInterface(Components.interfaces.nsIPrefService);        gPrefBranch = gPrefService.getBranch(prefbase);    }     // 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" );        }        // disable the xul element if the appropriate pref is locked.        if (gPrefBranch && gPrefBranch.prefIsLocked(setting)) {            checkbox.disabled = true;        }    }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/f0c6038400be0480cf70faf4fa0218e413171bc5/pref-winhooks.js/buggy/xpfe/components/prefwindow/resources/content/pref-winhooks.js