rem:  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); } } 
add: dialog = { titleDeck   : document.getElementById("dialog.titleDeck"), title       : document.getElementById("dialog.title"), progressDeck: document.getElementById("dialog.progressDeck"), progress    : document.getElementById("dialog.progress"), progressText: document.getElementById("dialog.progressText"), cancel      : document.documentElement.getButton("cancel") }; percentFormat = dialog.progressText.getAttribute("basevalue");  dialog.cancel.setAttribute("disabled", "true"); 
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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/59cd8cec6e8a8a946512ae4ad7ee8b2f545283fd/printProgress.js/buggy/xpfe/global/resources/content/printProgress.js