rem: if ( print_paper_size == gPrintOptInterface.kLetterPaperSize ) { dialog.paperGroup.selectedItem = dialog.letterRadio; } else if ( print_paper_size == gPrintOptInterface.kLegalPaperSize ) { dialog.paperGroup.selectedItem = dialog.legalRadio; } else if ( print_paper_size == gPrintOptInterface.kExecutivePaperSize ) { dialog.paperGroup.selectedItem = dialog.exectiveRadio; } else if ( print_paper_size == gPrintOptInterface.kA4PaperSize ) { dialog.paperGroup.selectedItem = dialog.a4Radio; } else if ( print_paper_size == gPrintOptInterface.kA3PaperSize ) { dialog.paperGroup.selectedItem = dialog.a3Radio; }  if ( print_orientation == gPrintOptInterface.kPortraitOrientation ) { dialog.orientationGroup.selectedItem = dialog.portraitRadio; } else  if ( print_orientation == gPrintOptInterface.kLandscapeOrientation ) { dialog.orientationGroup.selectedItem = dialog.landscapeRadio; }  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);  
context: function loadDialog(){  var print_color         = true;  var print_paper_size    = 0;  var print_orientation   = 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;  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_color      = printService.printInColor;    print_paper_size = printService.paperSize;    print_orientation = printService.orientation;    print_margin_top    = printService.marginTop;    print_margin_left   = printService.marginLeft;    print_margin_right  = printService.marginRight;    print_margin_bottom = printService.marginBottom;    print_command   = printService.printCommand;  }  if (doDebug) {    dump("printInColor  "+print_color+"\n");    dump("paperSize     "+print_paper_size+"\n");    dump("orientation   "+print_orientation+"\n");    dump("printCommand  "+print_command+"\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_command == "") {    print_command = default_command;  }  if ( print_color) {    dialog.colorGroup.selectedItem = dialog.colorRadio;  } else {    dialog.colorGroup.selectedItem = dialog.grayRadio;  }  if ( print_paper_size == gPrintOptInterface.kLetterPaperSize ) {    dialog.paperGroup.selectedItem = dialog.letterRadio;  } else if ( print_paper_size == gPrintOptInterface.kLegalPaperSize ) {    dialog.paperGroup.selectedItem = dialog.legalRadio;  } else if ( print_paper_size == gPrintOptInterface.kExecutivePaperSize ) {    dialog.paperGroup.selectedItem = dialog.exectiveRadio;  } else if ( print_paper_size == gPrintOptInterface.kA4PaperSize ) {    dialog.paperGroup.selectedItem = dialog.a4Radio;  } else if ( print_paper_size == gPrintOptInterface.kA3PaperSize ) {    dialog.paperGroup.selectedItem = dialog.a3Radio;  }  if ( print_orientation == gPrintOptInterface.kPortraitOrientation ) {    dialog.orientationGroup.selectedItem = dialog.portraitRadio;  } else  if ( print_orientation == gPrintOptInterface.kLandscapeOrientation ) {    dialog.orientationGroup.selectedItem = dialog.landscapeRadio;  }  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;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1fde5f13f3ec7880ec55d21c00cfccab6c2f05ce/printjoboptions.js/buggy/xpfe/global/resources/content/unix/printjoboptions.js