PLAN:
Make print preview suck less. Basically by showing the preview in a separate window like all sane programs.
- clone the currently viewed GaleonEmbed? (
galeon_embed_copy_page())
- print preview the new one (
galeon_embed_print())
- add
File/Print Preview...
- add
Print in the Print Preview dialog (see below)
OPEN ITEMS:
-
should there be a progress dialog in case it takes very long to finish the print preview?
- during cloning total progress doesn't seem to be available so progress bar is useless, you can only show activity
-
when switching on print preview, feedback might be available via nsIWebProgressListener (or net-state signals, I didn't actually check that)
NOTES:
- you can't print preview until the page has finished loading
- you can't print preview in
"net-stop" callback either, it's still too soon
- you can print preview in an idle function after
net-stop
- the new GaleonEmbed? should be shown only after
galeon_embed_print(), otherwise it will display the HTML rendering of the page for a short while and it's a very noticeably flash
-
net-stop isn't signalled if you print preview about:blank (what else?
)
- total time from click to finished print preview is somewhere between 300 – 1600 ms (though I observed some 4000 ms peak also)
-
galeon_embed_print() takes a few hundred milliseconds, most of the time is spent waiting
-
use busy cursor while waiting
-
you can print the original GaleonEmbed? and avoid the silly "can't print while in print preview" error
-
need to make sure the user can't load other URL while in print preview
-
what about autorefreshing pages?
- or you can just exit
Print Preview first