Ethereal-dev: [ethereal-dev] New "File/Print" menu item

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 29 Jul 1999 21:51:15 -0700
(Those of you who get "ethereal-cvs" probably saw this go by a while
ago, but I don't think all of you get "ethereal-cvs"....)

I added a "File/Print" menu item; currently, it prints all packets, in
text format.

It pops up a dialog box that lets you select whether to print to a
command (which defaults to the command specified in the print
preferences) or a file (which defaults to a blank file name, on the
theory that there's a reasonable chance that you won't always print to
the same file.

In the future, it should probably have the ability to print either all
packets or only packets selected by the current display filter, and
perhaps also the ability to print, from those sets of packets, a
selected range of packets (Network Monitor lets you print packets N
through M; it'd be nice to let you select the packet range in a more
convenient fashion, e.g. by selecting the starting and ending packets,
or by selecting a range of packets).

It might also be nice to let it print in PostScript as well, although
such a printout could take more than one page, and I'm not sufficiently
familiar with PostScript printing to know whether there's some cleverer
way of doing that than getting the font metrics, figuring out how tall
each line would be, figuring out how tall the page is, putting out the
page prologue, spitting out lines until you fill a page, putting out the
page epilogue, putting out a page prologue (if there are more lines to
print), putting out lines until you fill a page, etc.

"File/Print Packet" is still there, works as before, and still has
control-P as its accelerator; it's grayed-out if there's no packet
selected (some UI books seem to suggest that graying out controls is
better than having a "Sorry, you can't do that now" dialog box, although
the latter could, at least, tell you *why* you can't do that, instead of
just leaving you with a grayed-out control that you really want to do
something with, and no clue what you have to do to enable that control,
so maybe those UI books aren't entirely correct - I've heard that some
UI person praised AT&T's "we're sorry, your call cannot be completed as
dialed" error because it's so polite and apologizes to the user, but
that error always frustrates me because it doesn't tell me how I
*should* dial the call, e.g.  "leave out the area code", "put in the
area code", etc.).