Last Comment Bug 366347 - Default collate option sometimes off for printers that support it
: Default collate option sometimes off for printers that support it
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla10
Assigned To: Brian R. Bondy [:bbondy]
:
: Jim Mathies [:jimm]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-08 11:28 PST by Ben Turner (not reading bugmail, use the needinfo flag!)
Modified: 2011-09-29 15:49 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Always show collate when opening printer settings dialog (2.07 KB, patch)
2011-09-21 21:19 PDT, Brian R. Bondy [:bbondy]
benjamin: review+
Details | Diff | Splinter Review

Description Ben Turner (not reading bugmail, use the needinfo flag!) 2007-01-08 11:28:34 PST
I feel like most other major apps collate by default, and it is rather surprising each time Firefox doesn't.
Comment 1 :Gavin Sharp [email: gavin@gavinsharp.com] 2007-01-08 15:31:53 PST
Which print dialog? We only use the XUL print dialog for Linux, and it doesn't have a "collate" option. Mac and Windows use native print dialogs. On my computer (Windows XP), the "collate" checkbox is checked and disabled. I'm guessing this varies depending on your printer driver.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-01-08 16:43:14 PST
My printer supports collation, so I'm betting we just need to add DM_COLLATE to dmFields and set dmCollate to DMCOLLATE_TRUE somewhere around here:

http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsDeviceContextSpecWin.cpp#644

According to http://msdn2.microsoft.com/en-us/library/ms535771.aspx I think the value we specify will be ignored if the printer doesn't support it.

Weird that your WinXP system has it enabled by default, though... 
Comment 3 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-01-09 13:23:22 PST
On second thought... No.

That function is never hit in my debugger. Great.
Comment 4 Brian R. Bondy [:bbondy] 2011-09-21 21:19:16 PDT
Created attachment 561652 [details] [diff] [review]
Always show collate when opening printer settings dialog

At first, my printers would come up with collate auto-on (and disabled since 1 copy by default). This is expected behavior and was working correctly.

I did find a way to reproduce this though for a printer that supports collate having the default to off.
I simply had to print first to One Note, and then go back into the print dialog.  One Note only supports 1 copy prints and therefore no collate support.
It now had the default collate option off for all printers, even the ones that support collate.

What happens is that after you print to a printer that does not support collate, the setting is off for all printers for future prints.
As soon as you print again to a printer that supports collate, the setting is back on for future prints for the printers that support it (even if you selected no collate).

To fix I just explicitly set the collate option.
I verified and it remains unchecked if the printer driver does not support collate.
The problem is no longer reproducible with the above steps after the patch.
Comment 5 Brian R. Bondy [:bbondy] 2011-09-28 16:11:48 PDT
Pushed to try:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=245777a166b5
Comment 6 Brian R. Bondy [:bbondy] 2011-09-29 06:25:30 PDT
Pushed to inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/13ab1afb123a
Comment 7 :Ehsan Akhgari 2011-09-29 14:30:25 PDT
https://hg.mozilla.org/mozilla-central/rev/d1fefdd17225

I accidentally pushed this patch to mozilla-central while it was living on inbound.  On the next merge, it will be merged.  Sorry for the mess!
Comment 8 :Ehsan Akhgari 2011-09-29 15:49:17 PDT
Merged from inbound: https://hg.mozilla.org/mozilla-central/rev/13ab1afb123a

Note You need to log in before you can comment on or make changes to this bug.