Ethereal-dev: [Ethereal-dev] New colorization entry in the Capture dialog

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

Date Prev · Date Next · Thread Prev · Thread Next
From: John McDermott <jjm@xxxxxxxxxx>
Date: Mon, 03 Sep 2001 11:40:08 -0600
I have a need to let the user select the colorization scheme when she
starts a capture.  I implemented this with a fileselection dialog and a
combo box.  The diffs are attached. 

In doing this I discovered the horrible state of my first venture into
GTK+ coding: gtk/colors.c and gtk/color_dlg.c.  I am embarassed by the
code and plan on cleaning it up after the current project expires (or
sooner if I get really ahead...or really bored).

There is only one change that may have additional impact.  The
colorization filter file now has a header with a "magic number" of
"#EC".  The magic number is followed by a (probably never-changing)
version number.  This is to allow the combo box in the capture dialog to
select only color files from the ~/.ethereal directory.  This way one
can save many color schemes (e.g. 'mail' for smtp/pop/imap debugging and
'snmp' for snmp debugging) and choose them easily at capture time. The
colorization default file ~/.ethereal/colorfilters is still read on
startup, but only shows up in the Combo if it is of the new format.  To
change its format, one just does a "Save" in <Display:Colorize Display>.

--john
-- 
John McDermott, Writer and Consultant
J-K International, Ltd.
V +1 505/377-6293  F +1 505/377-6313
jjm@xxxxxxxxxx

Attachment: ethereal.diff.gz
Description: GNU Zip compressed data