From a19a1f0d0c5800ddf571abe8aee30d208db2b1f5 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Wed, 10 Jun 2015 18:10:28 +1200 Subject: [PATCH] bug 147419 remove ununsed nsIPrintSettings::printCommand and print_command prefs r=roc These was used only to write to and read from each other. --HG-- extra : rebase_source : ef49678652f829fe23611fb2294a22c3ffd91cf1 --- .../printingui/ipc/PPrintingTypes.ipdlh | 1 - modules/libpref/init/all.js | 12 --------- .../printing/content/printdialog.js | 1 - .../printing/content/printjoboptions.js | 25 ------------------- .../printing/content/printjoboptions.xul | 8 ------ .../en-US/chrome/global/printjoboptions.dtd | 3 --- widget/gtk/nsDeviceContextSpecG.cpp | 13 ---------- widget/nsIPrintSettings.idl | 5 ++-- widget/nsPrintOptionsImpl.cpp | 23 ----------------- widget/nsPrintSettingsImpl.cpp | 18 ------------- widget/nsPrintSettingsImpl.h | 1 - 11 files changed, 2 insertions(+), 108 deletions(-) diff --git a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh index a382bf9abbfc..87de5fda1bed 100644 --- a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh +++ b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh @@ -60,7 +60,6 @@ struct PrintData { bool printReversed; bool printInColor; int32_t orientation; - nsString printCommand; int32_t numCopies; nsString printerName; bool printToFile; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ad0ab191649b..749ec06e5340 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3513,7 +3513,6 @@ pref("helpers.global_mime_types_file", "/etc/mime.types"); pref("helpers.global_mailcap_file", "/etc/mailcap"); pref("helpers.private_mime_types_file", "~/.mime.types"); pref("helpers.private_mailcap_file", "~/.mailcap"); -pref("print.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); pref("print.printer_list", ""); // list of printers, separated by spaces pref("print.print_reversed", false); pref("print.print_color", true); @@ -3535,7 +3534,6 @@ pref("layout.css.scroll-snap.enabled", false); // pref("print.postscript.enabled", true); pref("print.postscript.paper_size", "letter"); pref("print.postscript.orientation", "portrait"); -pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); // Setting default_level_parent to true makes the default level for popup // windows "top" instead of "parent". On GTK2 platform, this is implemented @@ -3586,7 +3584,6 @@ pref("helpers.global_mime_types_file", "/etc/mime.types"); pref("helpers.global_mailcap_file", "/etc/mailcap"); pref("helpers.private_mime_types_file", "~/.mime.types"); pref("helpers.private_mailcap_file", "~/.mailcap"); -pref("print.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); pref("print.printer_list", ""); // list of printers, separated by spaces pref("print.print_reversed", false); pref("print.print_color", true); @@ -3722,7 +3719,6 @@ pref("font.name.monospace.zh-TW", "monospace"); // pref("print.postscript.enabled", true); pref("print.postscript.paper_size", "letter"); pref("print.postscript.orientation", "portrait"); -pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); // On GTK2 platform, we should use topmost window level for the default window // level of element of XUL. GTK2 has only two window types. One is @@ -3944,14 +3940,6 @@ pref("font.name.monospace.x-unicode", "dt-interface user-ucs2.cjk_japan-0"); # AIX #endif -#ifdef SOLARIS - -pref("print.postscript.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+-d\"$MOZ_PRINTER_NAME\"}"); -pref("print.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+-d\"$MOZ_PRINTER_NAME\"}"); - -# Solaris -#endif - // Login Manager prefs pref("signon.rememberSignons", true); pref("signon.autofillForms", true); diff --git a/toolkit/components/printing/content/printdialog.js b/toolkit/components/printing/content/printdialog.js index 245d3a6a0cf2..43a628b63be4 100644 --- a/toolkit/components/printing/content/printdialog.js +++ b/toolkit/components/printing/content/printdialog.js @@ -377,7 +377,6 @@ function onAccept() gPrintSetInterface.kInitSaveInColor | gPrintSetInterface.kInitSaveResolutionName | gPrintSetInterface.kInitSaveDownloadFonts | - gPrintSetInterface.kInitSavePrintCommand | gPrintSetInterface.kInitSaveShrinkToFit | gPrintSetInterface.kInitSaveScaling; printService.savePrintSettingsToPrefs(gPrintSettings, true, flags); diff --git a/toolkit/components/printing/content/printjoboptions.js b/toolkit/components/printing/content/printjoboptions.js index 9b2f51b1d88f..72f262fd4913 100644 --- a/toolkit/components/printing/content/printjoboptions.js +++ b/toolkit/components/printing/content/printjoboptions.js @@ -14,7 +14,6 @@ var gResolutionArray; var gColorSpaceArray; var gPrefs; -var default_command = "lpr"; var gPrintSetInterface = Components.interfaces.nsIPrintSettings; var doDebug = true; @@ -77,10 +76,6 @@ function initDialog() dialog.jobTitleGroup = document.getElementById("jobTitleGroup"); dialog.jobTitleInput = document.getElementById("jobTitleInput"); - dialog.cmdLabel = document.getElementById("cmdLabel"); - dialog.cmdGroup = document.getElementById("cmdGroup"); - dialog.cmdInput = document.getElementById("cmdInput"); - dialog.colorspaceList = document.getElementById("colorspaceList"); dialog.colorspaceGroup = document.getElementById("colorspaceGroup"); @@ -589,7 +584,6 @@ function loadDialog() var print_colorspace = ""; var print_color = true; var print_downloadfonts = true; - var print_command = default_command; var print_jobtitle = ""; gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); @@ -605,7 +599,6 @@ function loadDialog() print_colorspace = gPrintSettings.colorspace; print_color = gPrintSettings.printInColor; print_downloadfonts = gPrintSettings.downloadFonts; - print_command = gPrintSettings.printCommand; print_jobtitle = gPrintSettings.title; } @@ -620,7 +613,6 @@ function loadDialog() dump("colorspace "+print_colorspace+"\n"); dump("print_color "+print_color+"\n"); dump("print_downloadfonts "+print_downloadfonts+"\n"); - dump("print_command "+print_command+"\n"); dump("print_jobtitle "+print_jobtitle+"\n"); } @@ -709,16 +701,6 @@ function loadDialog() else dialog.jobTitleGroup.setAttribute("hidden","true"); - // 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"); @@ -780,10 +762,6 @@ function loadDialog() dialog.fontsGroup.setAttribute("hidden","true"); } - if (print_command == "") { - print_command = default_command; - } - if (print_color) { dialog.colorRadioGroup.selectedItem = dialog.colorRadio; } else { @@ -792,7 +770,6 @@ function loadDialog() dialog.downloadFonts.checked = print_downloadfonts; - dialog.cmdInput.value = print_command; dialog.jobTitleInput.value = print_jobtitle; dialog.topInput.value = gPrintSettings.edgeTop.toFixed(2); @@ -862,7 +839,6 @@ function onAccept() // save these out so they can be picked up by the device spec gPrintSettings.printInColor = dialog.colorRadio.selected; gPrintSettings.downloadFonts = dialog.downloadFonts.checked; - gPrintSettings.printCommand = dialog.cmdInput.value; gPrintSettings.title = dialog.jobTitleInput.value; gPrintSettings.edgeTop = dialog.topInput.value; @@ -883,7 +859,6 @@ function onAccept() dump("printInColor "+gPrintSettings.printInColor+"\n"); dump("downloadFonts "+gPrintSettings.downloadFonts+"\n"); - dump("printCommand '"+gPrintSettings.printCommand+"'\n"); } } else { dump("************ onAccept gPrintSettings: "+gPrintSettings+"\n"); diff --git a/toolkit/components/printing/content/printjoboptions.xul b/toolkit/components/printing/content/printjoboptions.xul index a332f095e8f8..ec048902a2f5 100644 --- a/toolkit/components/printing/content/printjoboptions.xul +++ b/toolkit/components/printing/content/printjoboptions.xul @@ -83,14 +83,6 @@ - - -