rem: dialog = new Object; dialog.strings = new Array; dialog.title        = document.getElementById("dialog.title"); dialog.titleLabel   = document.getElementById("dialog.titleLabel"); dialog.progress     = document.getElementById("dialog.progress"); dialog.progressText = document.getElementById("dialog.progressText"); dialog.progressLabel = document.getElementById("dialog.progressLabel"); dialog.tempLabel    = document.getElementById("dialog.tempLabel"); dialog.cancel       = document.getElementById("cancel");  dialog.progress.setAttribute("hidden", "true"); dialog.cancel.setAttribute("disabled", "true");  var progressLabel = getString("preparing"); if (progressLabel == "") { progressLabel = "Preparing..."; } dialog.tempLabel.value = progressLabel;  dialog.title.value = docTitle;   var object = this; doSetOKCancel("", function () { return object.onCancel();});   loadDialog();   printProgress.registerListener(progressListener); moveToAlertPosition();  window.setTimeout(doneIniting, 500); 
add:  printProgress.registerListener(progressListener); printProgress.doneIniting(); 
context: function onLoad() {    // Set global variables.    printProgress = window.arguments[0];    if (window.arguments[1])    {      progressParams = window.arguments[1].QueryInterface(Components.interfaces.nsIPrintProgressParams)      if (progressParams)      {        docTitle = elipseString(progressParams.docTitle, false);        docURL   = elipseString(progressParams.docURL, true);      }    }    if ( !printProgress ) {        dump( "Invalid argument to printProgress.xul\n" );        window.close()        return;    }    dialog = new Object;    dialog.strings = new Array;    dialog.title        = document.getElementById("dialog.title");    dialog.titleLabel   = document.getElementById("dialog.titleLabel");    dialog.progress     = document.getElementById("dialog.progress");    dialog.progressText = document.getElementById("dialog.progressText");    dialog.progressLabel = document.getElementById("dialog.progressLabel");    dialog.tempLabel    = document.getElementById("dialog.tempLabel");    dialog.cancel       = document.getElementById("cancel");    dialog.progress.setAttribute("hidden", "true");    dialog.cancel.setAttribute("disabled", "true");    var progressLabel = getString("preparing");    if (progressLabel == "") {      progressLabel = "Preparing..."; // better than nothing    }    dialog.tempLabel.value = progressLabel;    dialog.title.value = docTitle;    // Set up dialog button callbacks.    var object = this;    doSetOKCancel("", function () { return object.onCancel();});    // Fill dialog.    loadDialog();    // set our web progress listener on the helper app launcher    printProgress.registerListener(progressListener);    moveToAlertPosition();    //We need to delay the set title else dom will overwrite it    window.setTimeout(doneIniting, 500);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/2abcfc3bd3437e146a421dc9404a6e59b89a511a/printProgress.js/clean/xpfe/global/resources/content/printProgress.js