rem: dump("printReversed "+print_reversed+"\n"); dump("printInColor  "+print_color+"\n"); dump("paperSize     "+print_paper_size+"\n"); dump("printCommand  "+print_command+"\n"); dump("toFileName    "+print_file+"\n"); dump("printToFile   "+print_tofile+"\n"); dump("printToFile   "+print_tofile+"\n"); dump("print_frame   "+print_frametype+"\n"); dump("print_isFrame "+print_isFrame+"\n"); 
context: function loadDialog(){  var print_tofile        = false;  var print_reversed      = false;  var print_color         = true;  var print_paper_size    = 0;  var print_margin_top    = 0.5;  var print_margin_left   = 0.5;  var print_margin_bottom = 0.5;  var print_margin_right  = 0.5;  var print_command       = default_command;  var print_file          = default_file;  var print_selection_radio_enabled = false;  var print_isFrame       = false;  var print_frametype     = gPrintOptInterface.kSelectedFrame;  try {    printService = Components.classes["@mozilla.org/gfx/printoptions;1"];    if (printService) {      printService = printService.getService();      if (printService) {        printService = printService.QueryInterface(Components.interfaces.nsIPrintOptions);      }    }  } catch(e) {}  if (printService) {    print_reversed   = printService.printReversed;    print_color      = printService.printInColor;    print_paper_size = printService.paperSize;    print_margin_top    = printService.marginTop;    print_margin_left   = printService.marginLeft;    print_margin_right  = printService.marginRight;    print_margin_bottom = printService.marginBottom;    print_command   = printService.printCommand;    print_file      = printService.toFileName;    print_tofile    = printService.printToFile;    print_frametype = printService.printFrameType;    print_isFrame   = printService.isPrintFrame;    print_selection_radio_enabled = printService.GetPrintOptions(gPrintOptInterface.kPrintOptionsEnableSelectionRB);  } else {    dump("printService is null\n");  }  dump("printReversed "+print_reversed+"\n");  dump("printInColor  "+print_color+"\n");  dump("paperSize     "+print_paper_size+"\n");  dump("printCommand  "+print_command+"\n");  dump("toFileName    "+print_file+"\n");  dump("printToFile   "+print_tofile+"\n");  dump("printToFile   "+print_tofile+"\n");  dump("print_frame   "+print_frametype+"\n");  dump("print_isFrame "+print_isFrame+"\n");  dump("selection_radio_enabled "+print_selection_radio_enabled+"\n");  dump("print_margin_top    "+print_margin_top+"\n");  dump("print_margin_left   "+print_margin_left+"\n");  dump("print_margin_right  "+print_margin_right+"\n");  dump("print_margin_bottom "+print_margin_bottom+"\n");  if (print_file == "") {    print_file = default_file;  }  if (print_command == "") {    print_command = default_command;  }  if ( print_tofile) {    dialog.fileRadio.checked = true;    doPrintToFile( true );  } else {    dialog.printerRadio.checked = true;    doPrintToFile( false );  }  if ( print_color) {    dialog.colorRadio.checked = true;  } else {    dialog.grayRadio.checked = true;  }  if ( print_reversed) {    dialog.lastRadio.checked = true;  } else {    dialog.firstRadio.checked = true;  }  if ( print_paper_size == gPrintOptInterface.kLetterPaperSize ) {    dialog.letterRadio.checked = true;  } else if ( print_paper_size == gPrintOptInterface.kLegalPaperSize ) {    dialog.legalRadio.checked = true;  } else if ( print_paper_size == gPrintOptInterface.kExecutivePaperSize ) {    dialog.exectiveRadio.checked = true;  } else if ( print_paper_size == gPrintOptInterface.kA4PaperSize ) {    dialog.a4Radio.checked = true;  }  dialog.allpagesRadio.checked = true;  if ( print_selection_radio_enabled) {    dialog.selectionRadio.removeAttribute("disabled");   } else {    dialog.selectionRadio.setAttribute("disabled","true" );  }  doPrintRange(dialog.rangeRadio.checked);  dialog.frompageInput.value = 1;  dialog.topageInput.value   = 1;  dialog.topInput.value    = getDoubleStr(print_margin_top, 1);  dialog.bottomInput.value = getDoubleStr(print_margin_bottom, 1);  dialog.leftInput.value   = getDoubleStr(print_margin_left, 1);  dialog.rightInput.value  = getDoubleStr(print_margin_right, 1);  dialog.cmdInput.value    = print_command;  dialog.fileInput.value   = print_file;  dialog.print.setAttribute("value",  document.getElementById("printButton").getAttribute("value"));  // print frame  if ( print_isFrame ) {    dialog.aslayedoutRadio.removeAttribute("disabled");     dialog.selectedframeRadio.removeAttribute("disabled");     dialog.eachframesepRadio.removeAttribute("disabled");     dialog.printrangeGroupLabel.removeAttribute("disabled");     if (print_frametype == gPrintOptInterface.kFramesAsIs) {      dialog.aslayedoutRadio.checked = true;    } else if (print_frametype == gPrintOptInterface.kSelectedFrame) {      dialog.selectedframeRadio.checked = true;    } else if (print_frametype == gPrintOptInterface.kEachFrameSep) {      dialog.eachframesepRadio.checked = true;    }  } else {    dialog.aslayedoutRadio.setAttribute("disabled","true" );    dialog.selectedframeRadio.setAttribute("disabled","true" );    dialog.eachframesepRadio.setAttribute("disabled","true" );    dialog.printrangeGroupLabel.setAttribute("disabled","true" );      }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/baed08e917d3b7d4bca84a8cba122b0338bfc4be/printdialog.js/clean/xpfe/global/resources/content/unix/printdialog.js