Ethereal-dev: Re: [Ethereal-dev] Moving of prefs.c/.h and alike
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
Ulf Lamping wrote:
As I'm glad to see that you that you are moving the dissector specific
helper files to epan, I'm unsure if the prefs.c/.h in their present
state should be moved there, because the prefs.c contains a ot of
GTK/GUI related stuff.
Maybe it's an idea to split the parts of that file, but I didn't had a
closer look at it.
Do we have a general idea/guideline, which files should be in the epan
dir and which files should stay in the root dir? I would think that
dissection specific things should go to epan and general Ethereal things
should stay in the root dir, is that correct?
I personally think everything that is part of libethereal should be in
epan or subdirectories thereof.
This might mean that the code should be restructured to move some stuff
out of libethereal.
I might be tempted to rethink the way we do preferences. I'd mentioned
some of this a while ago, but the preferences should perhaps be divided
into at least two categories - the protocol preferences are arguably
somewhat different from at least some of the other preferences, because
1) the protocol preferences might be changed for different captures,
while the other preferences are more likely to be set once and left
alone after that;
2) changing a protocol preference requires a redissection, so it could
take a significant period of time, but changing most other preferences
don't.
I might be inclined to store most of the non-protocol preferences in the
"recent" file, and be saved immediately, with no "Save" button - and
have them take effect immediately, with no "Apply" button. (In fact, we
could arguably get rid of the "Name Resolution" preferences page, given
that you can control it from the "View" menu.)
I'd rename the protocol preferences "protocol settings", or something
such as that - and perhaps put them under "Analyze" (just as "Enabled
Protocols" is under "Analyze") - and have it still have "Save" and
"Apply" buttons, although I might call "Save" "Save as defaults" or
something such as that. (If we do that, I'd do the same with "Enabled
Protocols".)
Most of the preferences other than protocol preferences are GUI-related,
and the code to implement them could arguably be moved out of Ethereal.
"Printing" is also Ethereal-only. "Columns", "Capture", and "Name
Resolution" apply to both.
Given that, we might want to have multiple files for the settings - one
for stuff common to Ethereal and Tethereal, one for Ethereal-specific
stuff, and one for the protocol settings. The protocol settings code
would go into libethereal, but the code for the other settings would be
in the top-level directory. (We might keep the Ethereal-only and the
Ethereal+Tethereal preferences in the same file.)