Ethereal-dev: Re: [Ethereal-dev] A new counters tree window, and some implementations (IP, HTT

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Wed, 05 Jan 2005 21:09:22 +0100
LEGO wrote:

Hi,

As a byproduct of some work I'm doing on HTTP I've written a counters
tree window interface, it is very straightforward to implement, as a
matter of fact as once I was done with HTTP, it took me just minutes
to write the ISUP and the IP implementations .

Attached you will find:
- gtk/gtk_stats_tree.[ch] the code for the stats_tree tap-window
- gtk/ip_stat.c the stats window for IP
- a patch to gtk/isup_stat.c (which replaces thee old window with the newer one)
- a patch to gtk/http_stat.c and packet-http.[ch]
- three snapshots to the stat windows I've made

There are still some things to do:
I don't know if it runs under GTK1.
I don't think so. As far as I remember, e.g. the GtkTreeViewColumn and alike are very different in GTK 1.x and 2.x.

Being this my first GTK widget I do not know If I've got all straight.
Do I need to destroy myself the tree and other GTK "items" that belong
to the window or they are freed as the window is destroyed?
No. GTK will release all the child resources. Of course, you have to free things you've malloced yourself ;-)

However being so simple to use (take a look at ip_stat.c and see it
yourselves) I think is worth a try.
We could make this thing working with GTK 2.x only, or find someone backporting it to 1.x. I currently don't have the time to look at it, sorry.

Regards, ULFL