Closed
Bug 128142
Opened 23 years ago
Closed 22 years ago
[FIX]Need way to set/save the Print Command
Categories
(Core :: Printing: Output, defect, P2)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: mdeibler, Assigned: rods)
References
Details
Attachments
(1 file, 2 obsolete files)
89.59 KB,
patch
|
dcone
:
review+
attinasi
:
superreview+
shaver
:
approval+
|
Details | Diff | Splinter Review |
Mozilla 0.9.8 The Print Command for the PostScript/default printer is lost every time the browser is restarted. The value it starts with is "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" and there is nothing in the preferences to set this value. I can change it, but all changes are lost when the browser is shut down. This make printing bothersome as you have to change the Print Command every time you start the browser. Linux, RedHat (2.2.19-6.2.1 kernel)
Comment 2•23 years ago
|
||
gisburn, this sounds like one of yours...
Comment 4•23 years ago
|
||
We need a counterpart for InitPrintSettingsFromPrinter() - a SavePrintSettingsFromPrinter() to get this properly working. Otherwise we lack a centralized, general place where we save the settings, hack the code somewhere else and risking regression all the time... ;-( For now - as a workaround the user can do this: 1. set |pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");| in prefs.js to set the print command for all printers (note that ${MOZ_PRINTER_NAME} is the printer name (if it is != "default")). 2. set |pref("print.postscript.printer_foobar.print_command", "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");| in prefs.js to set the print command for printer "foobar" only (OK, a shorter way would be |pref("print.postscript.printer_foobar.print_command", "lpr -P foobar"|)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•23 years ago
|
||
sujay wrote:
> can we fix this ASAP? thanks..
Sure, but please give use the neccesary time to fix it using the clean solution
(e.g. |SavePrintSettingsFromPrinter()|) this time, otherwise it will come back
again some day (sort of undead zombie bug =:-) ...
Assignee | ||
Comment 7•23 years ago
|
||
This is really a problem for the UNIX folks.
can we back out the fix that caused this problem until we get a better fix? We're gonna get flooded with DUPs on this.
Assignee | ||
Comment 9•23 years ago
|
||
Inital patch
Assignee | ||
Updated•23 years ago
|
Summary: Need way to set/save the Print Command → [FIX]Need way to set/save the Print Command
Assignee | ||
Comment 11•23 years ago
|
||
This patch does the following: 1) Removes most all the unneeded data from nsPrintOptions service. All data should be in the PrintSettings. 2) Removed unneeded methods from PrintOptions 3) PrintOption can now read and write (most) all the data in a PrintSettings object. The items not saved are those used during the printing process and it wouldn't make any sense to save them. 4) Adds a prefs for turning on and off the automatic saving of PrintSettings. If this is turned on it is almost the same as using the global PS. 5) On Linux it turns on the saving of PS prefs and turns on the global PS. Meaning it will always use a single Global PS object. 6) The PrintSettings can be initialized from a generic non-printer specific set of prefs. Then if a printer name is available in the PS then it tries to initialize itself from the printer specific prefs. This enables to define "back stop" prefs for picking up first. Then the printer specific prefs can override those settings. For example, we may define in prefs that the default paper size 8.5x11, then if if the "save PS prefs" is turned on, for a given printer it might save 8.5x16 as the size.
Attachment #72007 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 72610 [details] [diff] [review] complete patch Nice... :) r=Roland.Mainz@informatik.med.uni-giessen.de Please file a bug to implement the Linux-specific parts for the new features introduced with this patch...
Attachment #72610 -
Flags: review+
Assignee | ||
Comment 13•22 years ago
|
||
The new feature is that I added the paperSizeName attr to nsIPrintSettings, needed to get that in before 1.0 iface freeze
Comment 14•22 years ago
|
||
Comment on attachment 72610 [details] [diff] [review] complete patch sr=attinasi (whew!)
Attachment #72610 -
Flags: superreview+
Assignee | ||
Comment 15•22 years ago
|
||
The difference between this patch and the previous patch is that I have added a set of "flags" for inidicating which PrintSettings attrs need to be init/saved to prefs. These are setup and used in printdialog.js Other than that, it is pretty much the same patch.
Assignee | ||
Updated•22 years ago
|
Attachment #72610 -
Attachment is obsolete: true
Comment 16•22 years ago
|
||
Comment on attachment 73863 [details] [diff] [review] final patch r=dcone
Attachment #73863 -
Flags: review+
Comment 17•22 years ago
|
||
Comment on attachment 73863 [details] [diff] [review] final patch sr=attinasi - You do not need to check for the doAll case - the bits are all filled for kInitSaveAll so the individual bit-tests will work fine.
Attachment #73863 -
Flags: superreview+
Assignee | ||
Comment 18•22 years ago
|
||
I just made the small change, ready for a=
Comment on attachment 73863 [details] [diff] [review] final patch a=shaver for the 1.0 trunk, but _please_ test printing thoroughly (once through each of those prefs) on the Big 3 before checking in.
Attachment #73863 -
Flags: approval+
Assignee | ||
Comment 20•22 years ago
|
||
fixed
Assignee | ||
Comment 21•22 years ago
|
||
really fixed Also earlier I checked in a bug that refered to this bug but it was Bug 128427
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 22•22 years ago
|
||
Had to back oout changes
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•22 years ago
|
Status: REOPENED → ASSIGNED
OS: Linux → All
This is breaking the Classic Mac builds on tinderbox.
Assignee | ||
Comment 24•22 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 25•22 years ago
|
||
Mike/Roland/Boris, does this look fixed to you all ? please check it out.. try in latest build...I"ll also try...lets report back here...thanks..
Comment 26•22 years ago
|
||
I didn't hear back from anyone...can a couple of you please help verify this? thanks!
Comment 27•22 years ago
|
||
I haven't tried any of the nightly builds, but on build 2002031312 (0.9.9) on all the operating systems that I've tried (Linux, NT, Win2K) the Print Background (colors & images) option still does not remember any values.
Comment 28•22 years ago
|
||
guys, I cannot verify this until I get some systems here configured to print on linux...can a couple of you help verify this?
Comment 29•22 years ago
|
||
still not fixed... I still get "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" in the Print Command field in the print dialog. it should be just "lpr"
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 30•22 years ago
|
||
sujay: It works for me. Steps to reproduct (without killing trees): 1. Open the Zilla 2. Go to the "File/Print..." menu 3. Printer should be "PostScript/default" (unless you do something special like MOZILLA_POSTSCRIPT_PRINTER_LIST or using Xprint) 4. Go to the print job options dialog 5. Replace the command with "tail" 6. Print 7. Exit the browser 8. Open the Zilla 9. Go to the "File/Print..." menu 10. Go to the print job options dialog Result: "tail" should be the print command for this printer Note that "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" is the _default_ for all printers to allow that Mozilla can set a specific printer name. Example: % export MOZILLA_POSTSCRIPT_PRINTER_LIST="foo bar" % ./mozilla will give you the printers "foo", "bar", "default" in the print dialog. Mozilla will set the $MOZ_PRINTER_NAME _INTERNALLY_ to the name of the selected printer - and the "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" will set the -P option of "lpr" based on that info. Where is your problem ?
Comment 31•22 years ago
|
||
Marking nsbeta1-.
Comment 32•22 years ago
|
||
ok it works.. REOPEN if anyone is still seeing a problem..
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•