aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-01-18 00:50:14 +0000
committerGerald Combs <gerald@wireshark.org>2013-01-18 00:50:14 +0000
commitae7ee61e842f46d0e7a7a4dc64c848866a6d7afb (patch)
tree6e483f057cb06bc3c9a8ee68a6211bd4be557f6a /epan/prefs.h
parent7a9095ee15c9ef012f3c8fd77c8f8cd06bdaa37b (diff)
Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than something we've saved in the preferences file. Update prefs_pref_to_str() to handle default, stashed, and current prefs. Create ui/preference_utils.[ch] and move some common routines there. Use prefs_pref_type_name() in the GTK+ preferences dialog. Make the "OK" button in the Qt preferences dialog work. We simply write the prefs and redissect on "OK" and do nothing on "Cancel". This is intentionally different from the Apply/OK/Cancel behavior in the GTK+ version. Add a general "emitAppSignal" method to wsApp and use it for packet dissection and preference changes. Suggest that we might want to create a WsString class to make conversion between QStrings, gchar *s, and GStrings easier. svn path=/trunk/; revision=47139
Diffstat (limited to 'epan/prefs.h')
-rw-r--r--epan/prefs.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/epan/prefs.h b/epan/prefs.h
index 461a04753a..9795ced0c1 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -113,6 +113,12 @@ typedef enum {
version_neither
} version_info_e;
+typedef enum {
+ pref_default,
+ pref_stashed,
+ pref_current
+} pref_source_t;
+
typedef struct _e_prefs {
gint pr_format;
@@ -474,15 +480,6 @@ const char *prefs_pref_type_name(pref_t *pref);
*/
char *prefs_pref_type_description(pref_t *pref);
-/** Check if a preference differs from its default value
- *
- * @param pref A preference.
- *
- * @return TRUE if the current value of the preference is the same as
- * its default value or FALSE if they differ.
- */
-gboolean prefs_pref_is_default(pref_t *pref);
-
/** Fetch a string representation of the preference.
*
* @param pref A preference.
@@ -491,7 +488,7 @@ gboolean prefs_pref_is_default(pref_t *pref);
*
* @return A string representation of the preference. Must be g_free()d.
*/
-char *prefs_pref_to_str(pref_t *pref, gboolean default_val);
+char *prefs_pref_to_str(pref_t *pref, pref_source_t source);
/* Read the preferences file, fill in "prefs", and return a pointer to it.
@@ -514,12 +511,6 @@ extern e_prefs *read_prefs(int *, int *, char **, int *, int *, char **);
into "*pf_path_return", and return the errno. */
extern int write_prefs(char **);
-/** Set a preference to its default value
- *
- * @param pref A preference.
- */
-extern void reset_pref(pref_t *pref);
-
/*
* Given a string of the form "<pref name>:<pref value>", as might appear
* as an argument to a "-o" option, parse it and set the preference in