Last Comment Bug 21432 - Implement Print Preview and Print Setup / Page Setup as in the browser
: Implement Print Preview and Print Setup / Page Setup as in the browser
Status: RESOLVED FIXED
composer++
: polish
Product: SeaMonkey
Classification: Client Software
Component: Composer (show other bugs)
: Trunk
: All All
: -- normal with 4 votes (vote)
: seamonkey2.6
Assigned To: Ian Neal
:
Mentors:
: 10664 47208 163396 194465 240374 (view as bug list)
Depends on: 20943 679320
Blocks: 17006 103890 676991 680805 688970
  Show dependency treegraph
 
Reported: 1999-12-10 14:51 PST by Chris McAfee
Modified: 2011-09-24 05:38 PDT (History)
15 users (show)
iann_bugzilla: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed


Attachments
Add File / Page Setup (1.08 KB, patch)
2003-09-16 07:18 PDT, neil@parkwaycc.co.uk
brade: review+
rbs: superreview+
asa: approval1.5-
Details | Diff | Splinter Review
Add print preview (12.97 KB, patch)
2011-08-16 17:44 PDT, Ian Neal
no flags Details | Diff | Splinter Review
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44] (15.15 KB, patch)
2011-08-17 08:34 PDT, Ian Neal
neil: review+
standard8: review+
Details | Diff | Splinter Review

Description Chris McAfee 1999-12-10 14:51:33 PST
Print|Preview brings up Print|Setup, AND Print|Setup is showing up
as a huge page.
Comment 1 rubydoo123 1999-12-10 15:38:59 PST
assigning to Charley so he can take a look
Comment 2 Charles Manske 1999-12-10 15:53:59 PST
Do whatever the browser does, which is currently not much!
Comment 3 Chris McAfee 1999-12-10 16:53:59 PST
bugs have been filed to fix the browser version of this.
Comment 4 Charles Manske 1999-12-17 14:09:59 PST
*** Bug 10664 has been marked as a duplicate of this bug. ***
Comment 5 rubydoo123 2000-01-19 16:10:59 PST
moving to m16 and cc dcone.

Don -- can you tell me when the infrastructure will be in for Print/Print
Preview?
Comment 6 Charles Manske 2000-04-12 13:09:24 PDT
Moving bugs I know I won't get to in M16
Comment 7 lchiang 2000-07-14 16:24:52 PDT
http://bugzilla.mozilla.org/show_bug.cgi?id=20943 says that this feature (Print 
Preview) is out for Seamonkey.
Comment 8 rubydoo123 2000-07-20 10:12:43 PDT
setting to future along with browser print preview and print setup
Comment 9 Kathleen Brade 2000-11-20 14:45:07 PST
*** Bug 47208 has been marked as a duplicate of this bug. ***
Comment 10 lchiang 2001-01-11 14:35:38 PST
Is this going to be in since http://bugzilla.mozilla.org/show_bug.cgi?id=20943 
is marked mozilla0.8?   Do we need similar bugs for mail?

Thanks.
Comment 11 Charles Manske 2001-01-11 15:24:28 PST
If 20943 is fixed, then it is very easy for me to do the editor version, since
it simply involves requesting a file save before calling the browser's print
methods.
Setting our milestone to 0.9
Comment 12 Charles Manske 2001-03-24 15:17:24 PST
Adding status to track important bugs that will be fixed automatically or with
minimum work once dependent bug is fixed.
Comment 13 Charles Manske 2001-03-26 12:59:52 PST
Related bugs have been futured. Changing this as well. Too bad! 
Comment 14 Syd Logan 2001-09-12 13:35:27 PDT
spam composer change
Comment 15 neil@parkwaycc.co.uk 2001-11-29 09:43:57 PST
Would it be sensible to put print preview into its own editor tab?
Comment 16 Fuzzy Gorilla 2002-02-21 16:41:30 PST
Now that Bug 20943 has been fixed, can this be retargeted?
Comment 17 Daniel Wang 2002-08-18 18:37:19 PDT
*** Bug 163395 has been marked as a duplicate of this bug. ***
Comment 18 Kathleen Brade 2002-09-19 12:33:34 PDT
*** Bug 163396 has been marked as a duplicate of this bug. ***
Comment 19 Akkana Peck 2002-11-20 13:19:37 PST
If this is easy to do, let's do it!  It would be a big win for home users.  nsbeta1+

(I like the separate tab idea -- would that be much more difficult?)
Comment 20 Charles Manske 2002-11-20 14:22:32 PST
It's not easy, last time I looked, else I would have fixed it long ago!
Comment 21 Samir Gehani 2003-01-15 15:11:35 PST
Composer triage team: nsbeta1-
Comment 22 M. Hope Aguilar 2003-02-17 21:38:42 PST
Guys:
THIS IS ABOUT PRINTING, BUT I CAN'T FIGURE OUT HOW TO FIND THE RIGHT SPOT, SO
YOU CAN REEASSIGN IT.
I can't figure out how to get an answer to this question, so I am reporting it
to Bugzilla in the hope of getting an answer (BTW Bugzilla is somewhat
counterintuitive, but far be it from me if this works for you and not the users
of the Mozilla browser who encounter problems . . .)

THIS IS A MAJOR ISSUE TO ME.

I need to print the content of some web pages, but Version 1.3 does not let me
PRINT and it cannot find the printer.  (I can't even get it to "print" to Adobe
Acrobat.)  Please let me know when you have a patch for this problem or if there
is another way I can print from my browser again.  

Until then, I will have to use (ugh) Micro$oft's Internet Exploiter.  (And I
really HATE to use it, so - please, PLEASE - let me know when you fix the
Mozilla browser so that I can print from it.)

IF THIS HAS GONE TO THE WRONG GROUP(which I assume), PLEASE FORWARD IT TO THE
RIGHT GROUP.

Thanks,
Hope
Comment 23 timeless 2003-02-17 21:55:23 PST
please don't editorialize
Comment 24 Pete Zha 2003-02-18 01:37:36 PST
hope@spamcop.net,
Please file a bug and log your problem there including build number, reproduce
steps and other necessary informations. thanks!
Comment 25 Kathleen Brade 2003-02-24 10:45:23 PST
*** Bug 194465 has been marked as a duplicate of this bug. ***
Comment 26 neil@parkwaycc.co.uk 2003-09-16 07:18:01 PDT
Created attachment 131557 [details] [diff] [review]
Add File / Page Setup
Comment 27 Kathleen Brade 2003-09-16 08:36:24 PDT
Comment on attachment 131557 [details] [diff] [review]
Add File / Page Setup

r=brade
Comment 28 rbs 2003-09-16 17:37:45 PDT
Comment on attachment 131557 [details] [diff] [review]
Add File / Page Setup

sr=rbs
Comment 29 neil@parkwaycc.co.uk 2003-09-17 01:39:49 PDT
Comment on attachment 131557 [details] [diff] [review]
Add File / Page Setup

Requesting approval because this provides some of the functionality of bug
159798 blocking bug 218324 (1.5 wish list) but is already checked into the
trunk.
Comment 30 neil@parkwaycc.co.uk 2003-09-17 01:42:00 PDT
Page Setup fix checked in, leaving bug open for Print Preview.
Comment 31 Asa Dotzler [:asa] 2003-09-19 14:40:52 PDT
How much testing has been done on this? Without having resolved this bug and
gotten it verified on the trunk it's very hard to evaluate for inclusion in the
branch. Can we get a new bug for the remaining feature work? 

Adding a feature this late in the game seems risky to me. 
Comment 32 Asa Dotzler [:asa] 2003-09-23 12:04:48 PDT
Comment on attachment 131557 [details] [diff] [review]
Add File / Page Setup

No response on testing. Not gonna make 1.5.
Comment 33 timeless 2003-10-21 12:26:04 PDT
.
Comment 34 Stefan Borggraefe 2004-04-13 01:43:42 PDT
*** Bug 240374 has been marked as a duplicate of this bug. ***
Comment 35 Wayne Mery (:wsmwk, NI for questions) 2005-11-17 06:49:21 PST
STM adding print preview is a low risk addition
Comment 36 Lewis Rosenthal 2005-11-23 11:57:05 PST
I'm surprised that this is still hanging around. In Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a1) Gecko/20051119 MultiZilla/1.8.1.0s SeaMonkey/1.5a, we have preview enabled for the browser, email, and address book, but still not for composer or chat. (Interestingly enough, I can't even find a print menu function for Venkman, let alone print preview...I guess nobody ever thought about making hard copies of debugger windows... ;-) )

Anyway, I've voted for this bug. I suppose if it were more important to more people, it wold have received more votes by this point in time!

Lewis
Comment 37 Ian Neal 2011-08-16 17:44:07 PDT
Created attachment 553643 [details] [diff] [review]
Add print preview

This patch:
* Creates two helpers in sidebarOverlay.js for use by the toggleAffectedChrome functions.
* Switches browser toggleAffectedChrome function to use new helpers.
* Adds PrintPreviewListener code for editors.
* Adds toggleAffectedChrome function for editors.
* Adds relevant xul/js to add print preview option to menus and print toolbar button.

The patch from bug 679320 is needed for this patch to work.
Comment 38 neil@parkwaycc.co.uk 2011-08-17 02:06:59 PDT
Comment on attachment 553643 [details] [diff] [review]
Add print preview

>+  commandTable.registerCommand("cmd_printpreview",   nsPrintPreviewCommand);
[Bah, why did mailnews have do do this one in lower case?]

>+  getNavToolbox: function () {
>+    return document.getElementById("sidebar-parent");
EditorToolbox, no?

>+<!ENTITY printPreviewCmd.accesskey "v">
Revert currently uses this access key. I couldn't think up an easy way around this; so far my best idea is Rever&t and E&xport to Text.

>+function SidebarHide_ReturnState() {
This looks a little ugly. I came up with the following idea:
function SidebarGetState() {
  if (sidebar_is_hidden())
    return "hidden";
  if (sidebar_is_collapsed())
    return "collapsed";
  return "visible";
}

function SidebarSetState(aState) {
  document.getElementById("sidebar-box").hidden = aState != "visible";
  document.getElementById("sidebar-splitter").hidden = aState == "hidden";
}
Then you can call SidebarSetState("hidden"); to hide the sidebar.
Comment 39 Ian Neal 2011-08-17 08:34:04 PDT
Created attachment 553786 [details] [diff] [review]
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44]

Changes since last version:
* Fixed accesskey conflict as suggested.
* Made helpers in sidebarOverlay.js less ugly as suggested.
* Corrected element that getNavToolbox uses.
Comment 40 neil@parkwaycc.co.uk 2011-08-17 09:15:22 PDT
Comment on attachment 553786 [details] [diff] [review]
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44]

>     // restoring normal mode (i.e., leaving print preview mode)
>-    if (gChromeState.sidebar == "was-collapsed" ||
>-        gChromeState.sidebar == "was-visible")
>-      document.getElementById("sidebar-splitter").hidden = false;
>-    if (gChromeState.sidebar == "was-visible")
>-      document.getElementById("sidebar-box").hidden = false;
Hmm, for some reason this code doesn't actually seem to work for a collapsed sidebar. At least now we've modularised it it will make it easier to fix in a followup bug :-)
Comment 41 Ian Neal 2011-08-17 16:36:22 PDT
Comment on attachment 553786 [details] [diff] [review]
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44]

As editor.js and editorOverlay.dtd are shared files, asking for additional review.
Comment 42 Mark Banner (:standard8) (afk until 26th July) 2011-09-24 03:06:59 PDT
(In reply to Ian Neal from comment #41)
> Comment on attachment 553786 [details] [diff] [review] [diff] [details] [review]
> Add print preview with no acceskey conflicts and less ugliness
> 
> As editor.js and editorOverlay.dtd are shared files, asking for additional
> review.

and ComposerCommands.js (which makes where you're putting things a bit more understandable).
Comment 43 Mark Banner (:standard8) (afk until 26th July) 2011-09-24 03:08:24 PDT
Comment on attachment 553786 [details] [diff] [review]
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44]

The TB bits look fine to me. You might just want to check that you're not adding a print preview option on Mac for SM, as Mac does things differently (the print dialog itself has a preview option).
Comment 44 Ian Neal 2011-09-24 05:26:26 PDT
Comment on attachment 553786 [details] [diff] [review]
Add print preview with no acceskey conflicts and less ugliness [Checked in: Comment 44]

http://hg.mozilla.org/comm-central/rev/64c8bd724634

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