Ethereal-dev: Re: [ethereal-dev] Colors

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 3 Jun 1999 16:22:05 -0700 (PDT)
> I did not know that this was so controversial.  Really, I like the control,
> as a user, of being able to control resources on the command line or from
> a file or dynamically with a program.  As an administrator I like to be
> able to set system-wide defaults which knowledgable users can then change.

...none of which *requires* the Xrm mechanism.  In fact, if the program
isn't an X application, the Xrm mechanism might not even be *available*
for that purpose.  (And, yes, non-X Ethereals might want to support
color; consider, for example, a "curses"-based one, on a color
terminal/color "xterm".)

> I have seen the early Win32 stuff.  I know very little about the gtk on Win32 
> libraries.  Do they have any external configuration?

It appears to use the same "gtkrc" stuff that GTK-on-X11-plus-UNIX does.

However, I don't consider something at Ethereal-specific as this to
belong there; choosing the color to use as background in a text widget,
maybe, but choosing the color to use to display the summary line for a
DNS packet, no (why should a window system toolkit know about DNS)?

> I will look at the Troll Tech stuff.  I personally use resources under KDE a 
> lot because KDE sets default colors I don't like.

I wouldn't expect Ethereal to have default colors for packet types other
than "black"; I'd expect a model like Network Monitor, wherein I'd pull
up, say, the "Preferences" dialog box, and select a protocol from a
scrolling list and then choose a color for it (from a NetMon-like
drop-down list, or from a GTK-style color picker - perhaps provide a
simple palette from something like a drop-down list, and let them pop up
the Full Frontal GTK Color Picker if they ask for it?).

Given that, I'm not sure something like the Xrm mechanism would buy you
anything, other than *maybe* not having to add parsing code to handle
color specifications in a ".ethereal/preferences" file.  If we were to
make those color settings persistent, so that you can make them apply to
the next instance of Ethereal to run (NetMon doesn't save configuration
items by default, but you can select a menu item to do that), we'd have
to arrange to write the resource settings out somewhere (just setting
them on the X server isn't guaranteed to make them persistent).