diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-26 03:31:30 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-26 03:31:30 +0000 |
commit | 12b5361a7be85bb7b22fd40be2feacba017e72a4 (patch) | |
tree | b1cab717186da7f568f8c582c04e52c7bda6d7ab /epan/prefs-int.h | |
parent | d3be76c0107d8c4584119e5af5c1d090cec38382 (diff) |
Remember the default value of each protocol preference.
If, when we're writing the preferences file, the current value of the
preference is the same as the default, write out the preference (since the
preference file is also the documentation for the preferences) but comment it
out (so that if, for example, you go back to an older version of Wireshark
you won't get warnings about non-existant preferences that you didn't
change--and thus probably don't care too much about).
It might be interesting to, in the future, add a UI to restore the default
values.
svn path=/trunk/; revision=32967
Diffstat (limited to 'epan/prefs-int.h')
-rw-r--r-- | epan/prefs-int.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/prefs-int.h b/epan/prefs-int.h index 3769dce666..10c491d10e 100644 --- a/epan/prefs-int.h +++ b/epan/prefs-int.h @@ -84,6 +84,13 @@ struct preference { range_t *range; } saved_val; /* original value, when editing from the GUI */ union { + guint uint; + gboolean boolval; + gint enumval; + char *string; + range_t *range; + } default_val; /* the default value of the preference */ + union { guint base; /* input/output base, for PREF_UINT */ guint32 max_value; /* maximum value of a range */ struct { |