struct pref_module {
const char *name; /* name of module */
- const char *title; /* title of module (displayed in preferences notebook) */
- gboolean is_subtree; /* if TRUE, this has other modules, not preferences, under it */
+ const char *title; /* title of module (displayed in preferences list) */
+ const char *description;/* Description of module (displayed in preferences notebook) */
void (*apply_cb)(void); /* routine to call when preferences applied */
- GList *prefs; /* list of its preferences or submodules */
+ GList *prefs; /* list of its preferences */
+ emem_tree_t *submodules;/* list of its submodules */
int numprefs; /* number of non-obsolete preferences */
gboolean prefs_changed; /* if TRUE, a preference has changed since we last checked */
gboolean obsolete; /* if TRUE, this is a module that used to
};
/*
- * Module used for protocol preferences. With MSVC and a
- * libwireshark.dll, we need a special declaration.
+ * Module used for protocol preferences.
+ * With MSVC and a libwireshark.dll, we need a special declaration.
*/
-ETH_VAR_IMPORT module_t *protocols_module;
+WS_VAR_IMPORT module_t *protocols_module;
/*
* PREF_OBSOLETE is used for preferences that a module used to support
PREF_ENUM,
PREF_STRING,
PREF_RANGE,
+ PREF_STATIC_TEXT,
+ PREF_UAT,
PREF_OBSOLETE
} pref_type_t;
gint *enump;
const char **string;
range_t **range;
+ void* uat;
} varp; /* pointer to variable storing the value */
union {
guint uint;
/* read_prefs_file: read in a generic config file and do a callback to */
/* pref_set_pair_fct() for every key/value pair found */
-typedef int (*pref_set_pair_cb) (gchar *key, gchar *value);
+typedef prefs_set_pref_e (*pref_set_pair_cb) (gchar *key, gchar *value, void *private_data);
int
-read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct);
+read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data);