context: function loadDialog(){  var print_copies        = 1;  var print_selection_radio_enabled = false;  var print_frametype     = gPrintSetInterface.kSelectedFrame;  var print_howToEnableUI = gPrintSetInterface.kFrameEnableNone;  var print_tofile        = "";  try {    gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);    printService = Components.classes["@mozilla.org/gfx/printsettings-service;1"];    if (printService) {      printService = printService.getService();      if (printService) {        printService = printService.QueryInterface(Components.interfaces.nsIPrintSettingsService);        printOptions = printService.QueryInterface(Components.interfaces.nsIPrintOptions);      }    }  } catch(e) {}  // Note: getPrinters sets up the PrintToFile radio buttons and initalises gPrintSettings  getPrinters();  if (gPrintSettings) {    print_tofile        = gPrintSettings.printToFile;    gOriginalNumCopies  = gPrintSettings.numCopies;    print_copies        = gPrintSettings.numCopies;    print_frametype     = gPrintSettings.printFrameType;    print_howToEnableUI = gPrintSettings.howToEnableFrameUI;    print_selection_radio_enabled = gPrintSettings.GetPrintOptions(gPrintSetInterface.kEnableSelectionRB);  }  if (doDebug) {    dump("loadDialog*********************************************\n");    dump("print_tofile            "+print_tofile+"\n");    dump("print_frame             "+print_frametype+"\n");    dump("print_howToEnableUI     "+print_howToEnableUI+"\n");    dump("selection_radio_enabled "+print_selection_radio_enabled+"\n");  }  dialog.printRangeGroup.selectedItem = dialog.allPagesRadio;  if (print_selection_radio_enabled) {    dialog.selectionRadio.removeAttribute("disabled");  } else {    dialog.selectionRadio.setAttribute("disabled","true");  }  doPrintRange(dialog.rangeRadio.selected);  dialog.fromPageInput.value  = 1;  dialog.toPageInput.value    = 1;  dialog.numCopiesInput.value = print_copies;  if (doDebug) {    dump("print_howToEnableUI: "+print_howToEnableUI+"\n");  }  // print frame  if (print_howToEnableUI == gPrintSetInterface.kFrameEnableAll) {    dialog.asLaidOutRadio.removeAttribute("disabled");    dialog.selectedFrameRadio.removeAttribute("disabled");    dialog.eachFrameSepRadio.removeAttribute("disabled");    dialog.printFrameGroupLabel.removeAttribute("disabled");    // initialize radio group    dialog.printFrameGroup.selectedItem = dialog.selectedFrameRadio;  } else if (print_howToEnableUI == gPrintSetInterface.kFrameEnableAsIsAndEach) {    dialog.asLaidOutRadio.removeAttribute("disabled");       //enable    dialog.selectedFrameRadio.setAttribute("disabled","true"); // disable    dialog.eachFrameSepRadio.removeAttribute("disabled");       // enable    dialog.printFrameGroupLabel.removeAttribute("disabled");    // enable    // initialize    dialog.printFrameGroup.selectedItem = dialog.eachFrameSepRadio;  } else {    dialog.asLaidOutRadio.setAttribute("disabled","true");    dialog.selectedFrameRadio.setAttribute("disabled","true");    dialog.eachFrameSepRadio.setAttribute("disabled","true");    dialog.printFrameGroupLabel.setAttribute("disabled","true");  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/bc93bea3244fa2ac7f0fc5c183b69795c1024718/printdialog.js/buggy/xpfe/global/resources/content/printdialog.js