Closed
Bug 157508
Opened 22 years ago
Closed 22 years ago
[FIX]Window not closed when user cancels PrintDialog
Categories
(MailNews Core :: Printing, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
mozilla1.2beta
People
(Reporter: rods, Assigned: rods)
Details
Attachments
(1 file)
6.25 KB,
patch
|
bugzilla
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
The DV now checks to see if the "document" is busy and "queues" the print request request. This causes a problem for mail because we try to print from the STOP notification. Which is fine, except if a user cancels the print dialog, the windows never gets cleaned up. Also, I think this may cause problems when printing multiple msgs.
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1alpha
Assignee | ||
Comment 1•22 years ago
|
||
Adds a PLEvent to give the DV time to finish executing the STOP so the busy flags get turned off and then we can have the DV execute the Print command synchronously up to the print dialog instead of queueing it.
Assignee | ||
Updated•22 years ago
|
Summary: Window not closed when user cancels PrintDialog → [FIX]Window not closed when user cancels PrintDialog
Comment 2•22 years ago
|
||
Comment on attachment 91332 [details] [diff] [review] patch R=ducarroz
Attachment #91332 -
Flags: review+
Comment 3•22 years ago
|
||
rods, sorry for the delay. I'm having problems understanding. Is the only problem when the user cancels the print dialog? What's the problem when we print multiple messages? Can you explain why using a PL_Event fixes the problem? If this fix turns out to be correct, this comment: // If something bad happens here (menaing we can fire the PLEvent, highly unlikely) should be: // If something bad happens here (meaning we can't fire the PLEvent, highly unlikely)
Assignee | ||
Comment 4•22 years ago
|
||
More explanation beyond Comment #1: The problem is that the MsgPrintEngine is being notified as a listener of nsIWebProgressListener::STATE_STOP, and then calls Print on the DocumentViewer (DV). The problem with this is that the DV checks to see if the document is still busy, which it still is becuase the Doc's flags aren't reset to "not busy" until after all the listeners are notified. The DV then "queues" the print request because the document is busy. Later the Print happens but at that point we have no way to tell the MsgPrintEngine that canceled happened. The fix introduces the PLEvent so that the document can notify all the listeners and then state the doc state to "not busy." So our PLEvent fires and says "Print" the DV is no longer busy and the Print request doesn't get queued and the return from the Print call is synchronuos with the proper error codes for the MsgPrintEngine to do the right thing. (BTW, we should copy these comments for documentation on mail printing)
Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.1alpha → mozilla1.2beta
Comment 5•22 years ago
|
||
Comment on attachment 91332 [details] [diff] [review] patch sr=sspitzer
Attachment #91332 -
Flags: superreview+
Assignee | ||
Comment 6•22 years ago
|
||
this was fixed as part of a different bug
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•