From 73740906f57c5fd5650ca2330ea7b255de24fe09 Mon Sep 17 00:00:00 2001 From: asac Date: Wed, 21 Feb 2007 03:34:15 +0100 Subject: [PATCH] ubuntu-printing patch --- layout/style/html.css | 7 +++++++ modules/libpref/src/init/all.js | 4 ++-- toolkit/components/printing/content/printdialog.js | 5 +++++ xpfe/global/resources/content/printdialog.js | 7 ++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/layout/style/html.css b/layout/style/html.css index 5392a5f..0f412ef 100644 --- a/layout/style/html.css +++ b/layout/style/html.css @@ -467,6 +467,13 @@ marquee[direction="up"], marquee[direction="down"] { /* PRINT ONLY rules follow */ @media print { + body { + font-family: times, serif; + } + tt, pre, listing, xmp, plaintext, code, kbd, samp { + font-family: courier, monospace; + } + marquee { -moz-binding: none; } /* XXX this should not be necessary, we should be stopping blinking diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index c38d2f6..81ac82a 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -1888,7 +1888,7 @@ pref("applications.telnet", "xterm -e telnet %h %p"); pref("applications.tn3270", "xterm -e tn3270 %h"); pref("applications.rlogin", "xterm -e rlogin %h"); pref("applications.rlogin_with_user", "xterm -e rlogin %h -l %u"); -pref("print.print_command", "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}"); +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); @@ -2225,7 +2225,7 @@ pref("print.xprint.font.force_outline_scaled_fonts", true); // 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}"); +pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); /* PostScript print module font config * this list is used by the postscript font diff --git a/toolkit/components/printing/content/printdialog.js b/toolkit/components/printing/content/printdialog.js index 4584a8a..0796045 100644 --- a/toolkit/components/printing/content/printdialog.js +++ b/toolkit/components/printing/content/printdialog.js @@ -160,6 +160,11 @@ listElement.prototype = if (strDefaultPrinterName == "") strDefaultPrinterName = printerNameStr; + // We strip PostScript/ from the front of displayed printer + // names. It's a bit kludgy to do this here but at least + // for Ubuntu all the printers come via CUPS. + var printerLabelStr = printerNameStr.replace(RegExp("^PostScript/"), ""); + list.appendItem(printerNameStr, printerNameStr, getPrinterDescription(printerNameStr)); } if (strDefaultPrinterName != "") { diff --git a/xpfe/global/resources/content/printdialog.js b/xpfe/global/resources/content/printdialog.js index 0525541..5b7e26b 100644 --- a/xpfe/global/resources/content/printdialog.js +++ b/xpfe/global/resources/content/printdialog.js @@ -160,7 +160,12 @@ listElement.prototype = if (strDefaultPrinterName == "") strDefaultPrinterName = printerNameStr; - list.appendItem(printerNameStr, printerNameStr, getPrinterDescription(printerNameStr)); + // We strip PostScript/ from the front of displayed printer + // names. It's a bit kludgy to do this here but at least + // for Ubuntu all the printers come via CUPS. + var printerLabelStr = printerNameStr.replace(RegExp("^PostScript/"), ""); + + list.appendItem(printerLabelStr, printerNameStr, getPrinterDescription(printerNameStr)); } if (strDefaultPrinterName != "") { this.listElement.removeAttribute("disabled"); -- 1.4.4.4