Ethereal-dev: Re: [Ethereal-dev] Toolbar

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 15 Oct 2003 01:26:59 -0700
On Wed, Oct 15, 2003 at 10:08:04AM +0200, Ulf Lamping wrote:
> Does this mean, we save all preference settings in the file, even if
> we only want to save the geometry of the window?

Sort of.  The code to save the geometry of the main window reads in the
existing preference file's settings, modifies them if the new geometry
1) should be saved and 2) differs from the geometry in the file, and
writes the preference file out if the geometry was modified.

This means that preferences are not overwritten by the current settings
(i.e., it's not a "Save").

However, it does mean that, for any settings that aren't already in the
file, the current values are written out, which means that:

	if they're not the default values, you now have the current
	setting as your default;

	if they are the default values, they're now in your preferences
	file, so if a later release changes the default you won't see
	that change.

Of the preference settings, I suspect that most of the ones that
*aren't* protocol preferences should be saved automatically whenever
they're changed, as they're likely to represent the user's universal
preference, as opposed to a setting for one particular file or just for
this session. 

The protocol preferences are a different matter - at least some of them
might often be changed on a per-capture basis.

The right way to handle this might be to have:

	*default* settings for them, which are stored in the preferences
	file;

	*current* settings for them, which are initialized from the
	default settings, and which are *not* stored in the preferences
	file.

Perhaps there should be a "Save As Default" button for the current
settings.

> I wonder a bit, as I can remember a discussion in this list (a while
> ago), where people (not me) didn't want to have (temporary user)
> preference changes be saved if not explicitly triggered by the user. 

At least for protocol preferences, that's sometimes the case - you don't
want them saved, because you're only changing some preference because
you need the new setting for the file you're currently reading.