rem: dialog.colorGroup.selectedItem = dialog.grayRadio; }  dialog.cmdInput.value = print_command; 
add: dialog.colorRadioGroup.selectedItem = dialog.grayRadio; }  dialog.downloadFonts.checked = print_downloadfonts;  dialog.cmdInput.value      = print_command; dialog.jobTitleInput.value = print_jobtitle; 
context: function loadDialog(){  var print_paper_type       = 0;  var print_paper_unit       = 0;  var print_paper_width      = 0.0;  var print_paper_height     = 0.0;  var print_paper_name       = "";  var print_plex_name        = "";  var print_color            = true;  var print_command          = default_command;  gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);  if (gPrintSettings) {    print_paper_type   = gPrintSettings.paperSizeType;    print_paper_unit   = gPrintSettings.paperSizeUnit;    print_paper_width  = gPrintSettings.paperWidth;    print_paper_height = gPrintSettings.paperHeight;    print_paper_name   = gPrintSettings.paperName;    print_plex_name    = gPrintSettings.plexName;    print_color        = gPrintSettings.printInColor;    print_command      = gPrintSettings.printCommand;  }  if (doDebug) {    dump("loadDialog******************************\n");    dump("paperSizeType "+print_paper_unit+"\n");    dump("paperWidth    "+print_paper_width+"\n");    dump("paperHeight   "+print_paper_height+"\n");    dump("paperName     "+print_paper_name+"\n");    dump("plexName      "+print_plex_name+"\n");    dump("printInColor  "+print_color+"\n");    dump("printCommand  "+print_command+"\n");  }  createPaperArray();  var paperSelectedInx = 0;  for (var i=0;i<gPaperArray.length;i++) {     if (print_paper_name == gPaperArray[i].name) {      paperSelectedInx = i;      break;    }  }    if (doDebug) {    if (i == gPaperArray.length)      dump("loadDialog: No paper found.\n");    else      dump("loadDialog: found paper '"+gPaperArray[paperSelectedInx].name+"'.\n");  }  createPaperSizeList(paperSelectedInx);  createPlexArray();  var plexSelectedInx = 0;  for (var i=0;i<gPlexArray.length;i++) {     if (print_plex_name == gPlexArray[i].name) {      plexSelectedInx = i;      break;    }  }    if (doDebug) {    if (i == gPlexArray.length)      dump("loadDialog: No plex found.\n");    else      dump("loadDialog: found plex '"+gPlexArray[plexSelectedInx].name+"'.\n");  }    createPlexNameList(plexSelectedInx);      /* Enable/disable and/or hide/unhide widgets based in the information   * whether the selected printer and/or print module supports the matching   * feature or not */  if (isListOfPrinterFeaturesAvailable()) {    // spooler command    if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_spoolercommand"))      dialog.cmdInput.removeAttribute("disabled");    else      dialog.cmdInput.setAttribute("disabled","true");          if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_spoolercommand_change"))      dialog.cmdGroup.removeAttribute("hidden");    else      dialog.cmdGroup.setAttribute("hidden","true");    // paper size    if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_paper_size"))      dialog.paperList.removeAttribute("disabled");    else      dialog.paperList.setAttribute("disabled","true");    if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_paper_size_change"))      dialog.paperGroup.removeAttribute("hidden");    else      dialog.paperGroup.setAttribute("hidden","true");                // plex mode    if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_plex"))      dialog.plexList.removeAttribute("disabled");    else      dialog.plexList.setAttribute("disabled","true");          if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_plex_change"))      dialog.plexGroup.removeAttribute("hidden");    else      dialog.plexGroup.setAttribute("hidden","true");  }  if (print_command == "") {    print_command = default_command;  }  if (print_color) {    dialog.colorGroup.selectedItem = dialog.colorRadio;  } else {    dialog.colorGroup.selectedItem = dialog.grayRadio;  }  dialog.cmdInput.value = print_command;  /* First initalize with the hardcoded defaults... */  dialog.topInput.value    = "0.04";  dialog.bottomInput.value = "0.04";  dialog.leftInput.value   = "0.04";  dialog.rightInput.value  = "0.04";  try {    /* ... then try to get the generic settings ... */    dialog.topInput.value    = gPrefs.getIntPref("print.print_edge_top") / 100.0;    dialog.bottomInput.value = gPrefs.getIntPref("print.print_edge_bottom") / 100.0;    dialog.leftInput.value   = gPrefs.getIntPref("print.print_edge_left") / 100.0;    dialog.rightInput.value  = gPrefs.getIntPref("print.print_edge_right") / 100.0;    /* ... and then the printer specific settings. */    var printername = gPrintSettings.printerName;    dialog.topInput.value    = gPrefs.getIntPref("print.printer_"+printername+".print_edge_top") / 100.0;    dialog.bottomInput.value = gPrefs.getIntPref("print.printer_"+printername+".print_edge_bottom") / 100.0;    dialog.leftInput.value   = gPrefs.getIntPref("print.printer_"+printername+".print_edge_left") / 100.0;    dialog.rightInput.value  = gPrefs.getIntPref("print.printer_"+printername+".print_edge_right") / 100.0;  } catch (e) {  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a2afb458636c1e10e8da90ac39d264b7e9d656b7/printjoboptions.js/buggy/xpfe/global/resources/content/unix/printjoboptions.js