Ethereal-users: Re: [Ethereal-users] Copying text out of Ethereal windows

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

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Tue, 17 Aug 2004 17:59:18 -0700 (PDT)
Chris Nelson said:
> I've recently rediscovered Ethereal and it's great but I ran up against
> a little thing that's really annoying and seems like a real oversight.
> I want to send a little text from an analysis to a colleague but I can't
> copy text from the Ethereal windows to my mail composition window.
> Ctrl-C doesn't work, the Edit menu has no Copy item, and there's no Copy
> on the context menu.  Is there some rationale for this or is it really
> only an oversight.

It's not that we don't think copy *should* be supported, it's just that
nobody has gotten around to implementing it.  The widgets used for the
packet list and packet detail pane don't provide it for free, so
somebody'd have to write some code to do it.

So it's not an "oversight" in the sense that we *forgot* to do it, and
there's no rationale in the sense of a reason why it *shouldn't* be done. 
It's just that it takes time, and the people who could do it might not
have the time to do it.

Yes, it can be annoying that it's missing, but "annoying" might well only
drive those annoyed by it to implement it - if nobody with the time and
GTK+ knowledge to do so is sufficiently annoyed, it might not happen.

A workaround is to export as plain text to a file and insert that file.

If there's anybody with both of those (I have the latter, but definitely
*not* the former) is interested, some things to consider are:

    1) you might want to put the widgets in question into a mode where
more than one row can be selected, so that you can select multiple
rows and have a copy get the text from all of them - this would mean
that code that currently assumes only one packet or detail line is
selected will have to stop assuming that (and perhaps, instead, do
what it does now only if one is selected, e.g. if you've selected
multiple packets, leave the detail pane blank - that matches what, for
example, OS X Mail.app does, and probably other applications as well);

    2) if you want to make it fit into a UNIX+X enviroment, you might want
to make it grab the primary selection, so that if you select stuff and
then click the middle mouse button in another window, the text from
the selected packets or rows is pasted;

    3) if you use the GTK+ 2.x APIs for clipboards, you might want to
consider copying the code from GTK+ 2.x that implements those APIs and
making a GTK+ 1.2[.x] version of it, modifying it as necessary to deal
with the GTK+ 1.2[.x] selection APIs, so that it's available in GTK+
1.2[.x] as well (there's already some copy-to-clipboard code that's
GTK+ 2.x-only because it uses the clipboard APIs).